|
-
JInternalFrame on top?
Hmm..I am trying to get a JInternalFrame to always be on top, but it seems to always go behind my "canvas". Any ideas?
///////////////////////////Declarations/////////////////////////////
Container container = null;
DisplayCanvas canvas;//DisplayCanvas extends Canvas
Image backbuffer;
JInternalFrame frame = new JInternalFrame();
JDesktopPane desktop = new JDesktopPane();
//////////////////////////init()/////////////////////////////////////
container = getContentPane();
container.setLayout(null);
desktop.setBounds(0,0,900,700);
frame.setBounds(100, 100, 100, 100);
container.add(desktop, null);
desktop.add(frame);
frame.setVisible(true);
frame.moveToFront();
canvas = new DisplayCanvas(backbuffer);
canvas.setBounds(200,25,630,630);
desktop.add(canvas);
////////////////////////////////////////////////////////////////
I tried to get out all the important parts from my code.
I am continually drawing the backbuffer image on the canvas. My problem, is I want my "frame" to be on top of the canvas when I drag it over, but I can't seem to figure it out.
Thanks!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks