• 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

null layout issue..........

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

i've an applet and i'm adding AWT ScrollPane to it. now, i'm adding individual panels (as records) into a new AWT Panel(which is null layout) and placing this AWT Panel in AWT ScrollPane.

the individual panels getting added vertically but when i resize the applet, all the individual panels(as records) laid out horizontally and so, obviously, only the horizontal bar is alone visible. instead i need it in vertical order only.

how to overcome this issue?
 
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
have you tried making the root panel BoxLayout on Y_AXIS?

Here's an example (lists all the fonts on your system):




NOTE: code runs faster if you embed Label rather
than Panel in the main panel... if you are
worried about performance
eg
// pnlMain.add(new Label(fontNames[i]));
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic