wood burning stoves 2.0
The moose likes Swing / AWT / SWT and the fly likes JFrames Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JFrames" Watch "JFrames" New topic


Dean Kiely

Joined: Feb 27, 2004
Posts: 23
Ok I am new to java. swing I am just trying to figure it out in my head. I am going to be running a java application and have different panels on it and a text area and a canvas area. What structure do I need to use inregards Panes, panels etc.
Many thanks.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15302

Snake Snake,
Welcome to Javaranch. We don't have too many rules around here but we do have a Naming Policy. Please adjust your display name to meet these requirements. You can change your display name here.
Also, I have deleted your duplicate post.
As for your question...
Structures you will probably be looking at are JFrame, JPanel, JTextArea, JScrollPane, etc. Your question is a little vague. The best thing to do is start going through Sun's Swing Tutorial.
Once you have some code going, and if you begin to have problems, you can ask specific questions about that code here.
Good luck and again, Welcome to the Ranch!

GenRocket - Experts at Building Test Data
Dean Kiely

Joined: Feb 27, 2004
Posts: 23
Thanks for the swift response. I have fixed my name up.
With regards to JFrame i just want to clarify that the outer most component is a JFrame then inside that I can have several Panels and were does the Content Pane come into things??
Jose Botella
Ranch Hand

Joined: Jul 03, 2001
Posts: 2120
Get a reference to the content pane with JFrame.getContentPane . Set the layout manager, and add components to it; intead of to the JFrame itelf.
See The Java Tutorial
[ February 27, 2004: Message edited by: Jose Botella ]

SCJP2. Please Indent your code using UBB Code
Dean Kiely

Joined: Feb 27, 2004
Posts: 23
right i have figured it out. I want a mainFrame with a text area on it and a japplet on it. do I only use the getContentPane() command once for the mainFrame??? I have the text area working fine but the japplet is a problem. any suggestions?
I agree. Here's the link: http://aspose.com/file-tools
subject: JFrames
It's not a secret anymore!