• Post Reply Bookmark Topic Watch Topic
  • New Topic

Image In JTabbedPane Background

 
Isaac Hewitt
Ranch Hand
Posts: 191
Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First of all I just want to compliment Sun on all the improvements to the Java language. My Java GUI runs at lightning speed on Vista, and there is no noticable difference between C++ and Java with regards to the user interface speed of execution as there has been in the past.
My question is whether or not it is possible to have an mage as background in the JTabbedPane. I have two tabs, each on containing a JPanel, and in each of the panels I have programmed an image for the background. It would be more effective just to have one image and use the opacity of the JPanel class to have that image show through each panel.

Thanks
 
Rob Camick
Ranch Hand
Posts: 2699
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It looks like you would need to create your own custom UI to do this.
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or, you can set the Image on the JTabbedPane instead of JPanel (I am presuming you are doing this by tweaking the paintComponent) and set the JPanel to transparent.
 
Rob Camick
Ranch Hand
Posts: 2699
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maneesh Godbole wrote:Or, you can set the Image on the JTabbedPane instead of JPanel (I am presuming you are doing this by tweaking the paintComponent) and set the JPanel to transparent.


You would think so, but I couldn't get it to work (hence my suggestion). Please post your working example.
 
Isaac Hewitt
Ranch Hand
Posts: 191
Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok I will look into creating a custom UI which is what I thought would be the solution in the first place. Thanks to Rob Camick.
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob Camick wrote:
You would think so, ..


Indeed. Found http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4765247
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!