Two Laptop Bag*
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JFrames" Watch "JFrames" New topic
Author

JFrames

Dean Kiely
Greenhorn

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: 15299
    
    6

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
Greenhorn

Joined: Feb 27, 2004
Posts: 23
Hey,
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
Greenhorn

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?
 
Don't get me started about those stupid light bulbs.
 
subject: JFrames
 
Similar Threads
Please help me work on my "Swing"
Problems adding two panels
Adjusting textarea size to window
Can I add a JPanel inside of another JPanel?
how to move the tab area freely like netbean?