• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JFrames

 
Dean Kiely
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Dean Kiely
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Dean Kiely
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic