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.
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!
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??
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
Joined: Feb 27, 2004
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?