• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
Bartenders:
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

Layout ,scrollbar problem

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hai,
I need a layout similar to
---------------------------------------------------------
|button a,b,c in flow layout, buttons d,e in card layout
|---------------------------------------------------------
|
| Image
|---------------------------------------------------------
| Scrollbar
----------------------------------------------------------
The problem is the scrollbar is being displayed in the first panel
along with cardlayout and is not visible at the bottom.

& is it possible to have labels at both the end of scrollbars like in
ColorChooser Applet for rbg.
 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
cardlayoutPanel = new Panel(cardlayout) // add d,e buttons
northPanel = new JPanel() //add a,b,c buttons, and cardlayoutPanel
imagelabel = new JLabel(image)
scrollPane = new ScrollPane(imageLabel,horScrlBar.ALWAYS,vertScrlBar.NEVER)

holdingPanel = new JPanel(borderLayout)
add northPanel to NORTH
add scrollPane to CENTER

add holdingPanel to contentPane/frame
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic