• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JFrames

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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??
 
Ranch Hand
Posts: 2120
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
reply
    Bookmark Topic Watch Topic
  • New Topic