View Single Post
  #1  
Old 10-10-2009, 10:12 AM
Bellum Bellum is offline
Novice
 
Join Date: Sep 2009
Posts: 25
Default Creating a Frame

I'm trying to figure out how to create a frame in UMC. I found this code on the web, but when I set up a .js file type "#JSREAD window" and I get the error.

missing ; before statement (window.js#2)

http://java.sun.com/docs/books/tutor...nts/frame.html

this is where I'm getting my commands from, for some reason I don't think umc likes the way I have it setup for some reason.

Code:
//1. Create the frame.

JFrame frame = new JFrame("FrameDemo");

//2. Optional: What happens when the frame closes?

frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

//3. Create components and put them in the frame.
//...create emptyLabel...
frame.getContentPane().add(emptyLabel, BorderLayout.CENTER);

//4. Size the frame.
frame.pack();

//5. Show it.
frame.setVisible(true);
Thanks in advance.

Last edited by Bellum; 10-10-2009 at 10:19 AM.
Reply With Quote