Alternate Processing Editor Using processing-java.exe on the Command line

Yes.

Minimal code:

import javax.swing.*;
import java.awt.*;
import org.fife.ui.rsyntaxtextarea.*;

RSyntaxTextArea txtArea;

void setup() {
  size(600, 400);  // Set the Processing window size

  txtArea = new RSyntaxTextArea();
    
  RTextScrollPane scrollPane = new RTextScrollPane(txtArea);
  
  JFrame editorFrame = new JFrame("Editor");

  JPanel emptyPanel = new JPanel();
  emptyPanel.setPreferredSize(new Dimension(600, 100));  // 100px height for top panel
  
  editorFrame.add(emptyPanel, BorderLayout.NORTH);  // Add top panel (100px high)
  editorFrame.add(scrollPane, BorderLayout.CENTER);  // Take up remaining space
  editorFrame.setSize(600, 400);  // Total window size 
  editorFrame.setVisible(true);  // Show the window
}

:)

1 Like