Win a copy of Head First Android this week in the Android forum!
  • 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
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

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
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic