• 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
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

JTabbedPanes see-through ImageIcons

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a JTabbedPane with three tabs. The First and Third tabs have an ImageIcon (each different instance). When the Frame (DialogFrame) first comes up the ImageIcon in Tab 3 shows through on top of Tab 1. Now when you select the Tabs 3 and then 1 the ImageIcon is then fixed and not seen-through to the first tab. How to fix? I don't want to see the Tab 3 ImageIocn in Tab 1. For testing I have tried using the same ImageIcon instance in Tab 1 also in Tab 3 and it still does the same behavior.
[ August 17, 2003: Message edited by: James Redpath ]
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you post the code relevant to setting up the JTabbedPane and the icons? I'm not sure what you mean by "showing through"... Maybe redraw problems? Or maybe mixing heavy and lightweight components?
 
James Redpath
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I found it I was using a Canvas and drawing the ImageIcon. Instead I used a JLabel with ImageIcon and it fixed it. This made it less complicated as well. I forgot that SWING now provides ImageIcon use with a label.
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by James Redpath:
I found it I was using a Canvas and drawing the ImageIcon. Instead I used a JLabel with ImageIcon and it fixed it. This made it less complicated as well. I forgot that SWING now provides ImageIcon use with a label.


"Now provides.."?? When did they not provide that? Well, I guess I have only been using SWING since jdk1.3 though.
 
Weeds: because mother nature refuses to be your personal bitch. But this tiny ad is willing:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic