Thread View: comp.lang.java.gui
5 messages
5 total messages
Started by Thomas Due
Tue, 21 Mar 2000 00:00
BufferedImage painting over the Menu -- need help
Author: Thomas Due
Date: Tue, 21 Mar 2000 00:00
Date: Tue, 21 Mar 2000 00:00
23 lines
1845 bytes
1845 bytes
I am currently writing an application which is composed like this: A JFrame containing a MenuBar and a JPanel, which in turn contains a BufferedImage. The image is using doubled-buffering to present graphics fast. There is nothing special about the menu, it contains among others a menu named "File", which contains items named "New", "Open", "Save", etc. My problem is that the BufferedImage is painting over the menu when they pull down. In other words it looks like the menus pull down BEHIND the BufferedImage. All components are added correctly to the frame using the ContentPane etc. Does anyone have any idea about what I do to get the menu to show properly, or to prevent the BufferedImage from painting over the menu? If you have a solution, I prefer respons by e-mail: tduexx@students.aabc.dk Thank you in advance, Thomas Due
Sv: BufferedImage painting over the Menu -- need help - (Additional)
Author: Thomas Due
Date: Tue, 21 Mar 2000 00:00
Date: Tue, 21 Mar 2000 00:00
39 lines
2251 bytes
2251 bytes
I forgot to say that the BufferedImage is not contained directly in the JPanel. I have a class which extends canvas, and THAT class contains the BufferedImage, and are contained in a JPanel. Sorry, Thomas Thomas Due <tduexx@students.aabc.dk> skrev i en nyhedsmeddelelse:8b79ir$mjg$1@news.net.uni-c.dk... > I am currently writing an application which is composed like this: > > A JFrame containing a MenuBar and a JPanel, which in turn contains > a BufferedImage. The image is using doubled-buffering to present graphics > fast. > > There is nothing special about the menu, it contains among others a menu > named "File", which contains items named "New", "Open", "Save", etc. > > My problem is that the BufferedImage is painting over the menu when they > pull down. In other words it looks like the menus pull down BEHIND the > BufferedImage. > > All components are added correctly to the frame using the ContentPane etc. > > Does anyone have any idea about what I do to get the menu to show properly, > or to prevent the BufferedImage from painting over the menu? > > If you have a solution, I prefer respons by e-mail: tduexx@students.aabc.dk > > Thank you in advance, > > Thomas Due > >
Re: Sv: BufferedImage painting over the Menu -- need help - (Additional)
Author: Roger Lindsj|
Date: Tue, 21 Mar 2000 00:00
Date: Tue, 21 Mar 2000 00:00
13 lines
1468 bytes
1468 bytes
In article <8b7a4e$n8g$1@news.net.uni-c.dk>, Thomas Due <tduexx@students.aabc.dk> wrote: >I forgot to say that the BufferedImage is not contained directly in the >JPanel. >I have a class which extends canvas, and THAT class contains the >BufferedImage, >and are contained in a JPanel. And that is where your problem is. You should not mix light-weight (swing) components with heavy-weight (AWT) components. Try using a lightweight component instead of a Canvas. Roger Lindsj�
Re: BufferedImage painting over the Menu -- need help
Author: Marcus Biervliet
Date: Tue, 21 Mar 2000 00:00
Date: Tue, 21 Mar 2000 00:00
30 lines
2100 bytes
2100 bytes
I ask the same question a week ago and got no reply. I start reading documents and mine is now working!! Good luck reading Thomas Due wrote: > I am currently writing an application which is composed like this: > > A JFrame containing a MenuBar and a JPanel, which in turn contains > a BufferedImage. The image is using doubled-buffering to present graphics > fast. > > There is nothing special about the menu, it contains among others a menu > named "File", which contains items named "New", "Open", "Save", etc. > > My problem is that the BufferedImage is painting over the menu when they > pull down. In other words it looks like the menus pull down BEHIND the > BufferedImage. > > All components are added correctly to the frame using the ContentPane etc. > > Does anyone have any idea about what I do to get the menu to show properly, > or to prevent the BufferedImage from painting over the menu? > > If you have a solution, I prefer respons by e-mail: tduexx@students.aabc.dk > > Thank you in advance, > > Thomas Due
Re: Sv: BufferedImage painting over the Menu -- need help - (Additional)
Author: Frank Plaßmeier
Date: Wed, 22 Mar 2000 00:00
Date: Wed, 22 Mar 2000 00:00
39 lines
2265 bytes
2265 bytes
This is a multi-part message in MIME format. --------------95CFB8C3A3C29E4C1203E6F4 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit The advice not to mix heavyweight (i. e. AWT) and lightweight (i. e. Swing) components is generally correct. As far as menus (JMenu, JPopupMenu) and combo boxes (JComboBox) are concerned, there is however a workaround: Use setLightweightPopupEnabled(false) to ensure that the menu (or combo box) items are displayed on top of heavyweight components (for JMenu objects, use getPopupMenu() to retrieve the associated popup menu). Kind regards, Frank Pla�meier --------------95CFB8C3A3C29E4C1203E6F4 Content-Type: text/x-vcard; charset=us-ascii; name="Frank.Plassmeier.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for Frank Pla�meier Content-Disposition: attachment; filename="Frank.Plassmeier.vcf" begin:vcard n:Pla�meier;Frank tel;cell:+49 (0) 177 737 14 85 tel;fax:+49 (0) 421 539 45 29 tel;work:+49 (0) 421 539 46 55 x-mozilla-html:FALSE org:DASA RI;RIO 61 adr:;;P. O. Box 28 61 56;Bremen;;D-28361;Germany version:2.1 email;internet:Frank.Plassmeier@ri.dasa.de title:Dipl.-Inform. fn:Frank Pla�meier end:vcard --------------95CFB8C3A3C29E4C1203E6F4--
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads