Official Nodeka Board  

Go Back   Official Nodeka Board > Nodeka > Scripting > UMC

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #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
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:04 AM.


Design By: Miner Skinz.com
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.