• 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

scrollbar for JTabbedPane

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
iam suresh. iam developing an simple java Swing application in which i have a main GUI which holds 6 tabs . is it possible to drag any of the tabs main GUI frame and view it seperately .
i tried setting a JScrollPane for the tabs but not visible .
could u pls help me out how to do this .
 
Sheriff
Posts: 4012
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to JavaRanch, Suresh.
There's a little rule around here about what your display name has to look like: 2 names, preferably your real name or one that looks real (the name rule).
Could you please take a minute to change your display name? Thanks, and hope you visit the ranch often.
Pauline
 
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you saying that you want to drag a tab out of a tabbed pane and show the contents of that tab in a separate frame/window? Should the tab be removed from the original window? Should the contents of that tab be removed from the tab or should they be duplicated?
Or am I misunderstanding you?
Bill
 
vaka suresh
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi liteplo
thanks for ur kind reply for the question i have asked in javaranch.
what u have asked is right .
when i drag a new window or panel should come and the one in the main tab should dissappear.

i want to drag a tab out of a tabbed pane and show the contents of that tab in a separate frame/window. the tab should be removed from the original window. The contents of that tab be removed from the tab
could u pls tell me how to add a scroll bar for the tabs , i have added the jscrollpane but the scroll bar is not visible.
 
Bill Liteplo
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try This post from, like, yesterday regarding making scrollbars appear.
API Javadocs are our friends
Regarding the DND issues... well, I'm not really an expert on that. I don't know how much, if at all, you have already attacked this problem. It helps if you are familiar with the Java drag and drop API (which I am not, really).
What I do know is that you should make the tab a drag source. That will let you pick it up. Then when you drag out of the window you can have your listener tell the tabbed pane to remove that tab. Since you don't really have a drop target other than thin air (i.e. the space on your screen not utilized by your Java program's windows), I'm not totally sure how to drop onto something, but I'm sure you can figure it out with some painstaking effort, sweat and significant profanity directed at Sun.
Sorry I can't give you much more than that.
Good luck!
Bill
 
vaka suresh
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
thanks for ur sujestion.
how can i add a scroll bar for the JTabbs. i have 6 tabs in a frame . i have added the tabs for a scrollpane but still iam not getting the scrollbars. couldu pls help me out.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic