aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes What to draw on? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "What to draw on?" Watch "What to draw on?" New topic
Author

What to draw on?

Liz Hundy
Greenhorn

Joined: Feb 21, 2006
Posts: 11
Hello,

I want to make a dynamic picture in my application.

So I made a subclass of Canvas and made a very nice drawing.

But now I find that my JComboBox insists on opening behind the canvas.

So what should I do to make a drawing that goes behind the drop-down of a JComboBox?

---Liz
Jeff Albertson
Ranch Hand

Joined: Sep 16, 2005
Posts: 1780
JPanel.


There is no emoticon for what I am feeling!
Liz Hundy
Greenhorn

Joined: Feb 21, 2006
Posts: 11
Thanks.

That works a treat.

---Liz
Jeff Albertson
Ranch Hand

Joined: Sep 16, 2005
Posts: 1780
Matti Poro
Ranch Hand

Joined: Dec 03, 2005
Posts: 41
Or JComponent. Canvas is a heavy-weight (AWT) component and the classes which start with J are light-weight components (Swing). You shouldn't usually mix AWT and Swing in your program because it can cause problems like the one you experienced.
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

Moving to Swing/AWT forum...


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What to draw on?