• 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

a question about the restriction to the assignment

 
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It says: "It must be composed exclusively with compoments from the JFC(Swing)". What about the non-component? What I means is if I want to set the layout for a JPanel. the one I want to use, BorderLayout is in awt package, is it ok to use it?
Thanks.
Bing
 
Ranch Hand
Posts: 619
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bing,
Welcome to this forum.

Originally posted by Bing Yuen:
It says: "It must be composed exclusively with compoments from the JFC(Swing)". What about the non-component? What I means is if I want to set the layout for a JPanel. the one I want to use, BorderLayout is in awt package, is it ok to use it?


BorderLayout is fine. If there's a JComponent available then you should use it rather than a Component. For example, use JFrame instead of Frame, use JLabel instead of Label, etc. There's a good number of classes that we need to use from the old AWT because Swing does not provide an alternative. Where there's no alternative to AWT you can use AWT, where there's a Swing alternative you should use the Swing component.
[ March 25, 2004: Message edited by: George Marinkovich ]
 
Ben Zung
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
George:
Thanks for the "welcome" and your explanation. It is very good and helpful to know that.
Again, thank you.
Bing
 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hmm... I have same question. It is said:

it must be composed exclusively with components from the JFC(Swing)


You say:

Where there's no alternative to AWT you can use AWT, where there's a Swing alternative you should use the Swing component.


In fact, there is some alternative to AWT layouts, such as BoxLayout, SpringLayout, etc.
Does Sun mean "components" or "Components" (which extend JComponent)?
In my assignment I use GridLayout and GridBagLayout. Is it ok?
 
Ranch Hand
Posts: 697
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Denis

Originally posted by Denis Spirin:
In my assignment I use GridLayout and GridBagLayout. Is it ok?


I think its OK to use them. I remember Ken used GridBagLayout and he got great score.
 
Denis Spirin
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks
reply
    Bookmark Topic Watch Topic
  • New Topic