Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-19-2007, 08:32 PM
JSK JSK is offline
Member
 
Join Date: Nov 2007
Posts: 3
Rep Power: 0
JSK is on a distinguished road
Default Canvas rendered over JCombobox menu
Hello everyone,
I've been googling and asking for help for a while, but no success.
I've got a Canvas where some stuff is drawn, and a few buttons and comboboxes next to it, lined in a row under the drawing area. When I click on any of the comboboxes, part of the drop-down menu has to be rendered over canvas, but it is always behind it:
http://img69.imageshack.us/img69/3017/15605599kh6.gif
Why does this happen, and what can I do?

tnx in advance
Bookmark Post in Technorati
Reply With Quote
  #2 (permalink)  
Old 11-19-2007, 08:43 PM
hardwired's Avatar
Senior Member
 
Join Date: Jul 2007
Posts: 1,577
Rep Power: 4
hardwired is on a distinguished road
Default
Canvas is an AWT, heavyweight component. J–prefix components are Swing, lightweight components. Heavyweight components get rendered on top of/over/above lightweight components and obscure them. Although you can mix them there are some things to be aware of in doing so. For a discussion of this see Mixing heavy and light components.
If you choose to stick with Swing you could replace the Canvas with a JPanel.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 11-19-2007, 09:00 PM
JSK JSK is offline
Member
 
Join Date: Nov 2007
Posts: 3
Rep Power: 0
JSK is on a distinguished road
Default
Oh, I think that's a perfect reply, thanks a lot, it works now
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to create Popup Menu with Sub Menu while right-clicking the JTree Node?? Kabiraa AWT / Swing 7 05-09-2008 08:54 AM
Calling displayable from a canvas class Snalk CLDC and MIDP 0 03-29-2008 12:58 AM
Using SWT Canvas Java Tip Java Tips 0 01-08-2008 10:06 AM
SWT Canvas JavaForums Java Blogs 0 12-31-2007 05:53 PM
Canvas question christina Advanced Java 1 08-03-2007 08:21 PM


All times are GMT +2. The time now is 01:25 AM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org