The Artima Developer Community
Sponsored Link

Java Answers Forum
problem in doing full screen fame and adding a glasspane to frame

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
harsimran kochar

Posts: 1
Nickname: harsimran0
Registered: Aug, 2011

problem in doing full screen fame and adding a glasspane to frame Posted: Aug 23, 2011 6:42 AM
Reply to this message Reply
Advertisement
import java.awt.*;
import javax.swing.*;
import java.awt.ToolKit;
class MyFrame extends Jframe{
Container c;
JPanel glass;
MyFrame(){
setTitle("glass pane");

Dimension d=ToolKit.getDefaultToolKit().getScreenSize();
setbounds(0,0,d.screenWidth,d.sc reen.Height);

c=getContentPAne();
setLayout(null);

glass=getGlassPAne();
glass .setVisible(true);
glass.setBounds(200,200,200,200);
c.add(glass);

setVisible(t rue);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
}
public class GlassPane{
public static void main(String[] args){
new MyFrame();
}
}

Topic: Java - Stack, heap, method aread, String costant pool Previous Topic   Next Topic Topic: multiple versions of same jar

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use