Ok so I don't know if this has been written about anywhere else, (or if anyone cares) but I found the best way to do this is to create a window as follows:
Embed your Processing Sketch in a JInternalFrame
Set JInternalFrame resizable to false
turn off JInternalFrame UI with this bit of code:
- BasicInternalFrameUI ui = (BasicInternalFrameUI)jinternalframe.getUI();
- jinternalframe.putClientProperty("titlePane", ui.getNorthPane());
- jinternalframe.putClientProperty("border", jinternalframe.getBorder());
- ui.setNorthPane(null);
(obviously in the above code, jinternalframe refers to your JInternalFrame and should be replaced with whatever name you have for it)
Embed that JInternalFrame within a JPanel
Create a JFrame
Within that JFrame embed a JScrollpane
Add your JPanel to the JScrollpane
This will create a fixed size sketch within a resizable window, allowing you to scroll to see the full sketch.
If anyone's interested further, I can post a well-commented example/tutorial thing.
___________
http://justinlivi.net