jFrame Fullscreen

i want to create fullscreen application using jframe and jpanel

but the taskbar still showing...
how to fullscreen the application?

package test_progs;
 
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.GraphicsEnvironment;
import javax.swing.JFrame;
import javax.swing.JPanel;
 
 
/**
 *
 * @author tys
 */
public class test_fullscreen extends JFrame{
    public test_fullscreen(){                                
        tys_panel panel = new tys_panel();               
        add(panel);        
 
        setUndecorated(true);
        setBackground(Color.WHITE);
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
        setSize(ge.getMaximumWindowBounds().width,ge.getMaximumWindowBounds().height);
        setVisible(true);
        setTitle("test fullscreen");
    }
 
    public static void main(String[] args){
        new test_fullscreen();
    }//Main   
}
 
class tys_panel extends JPanel{        
    public tys_panel(){
 
    }
 
    protected void paintComponent(Graphics g){
        super.paintComponent(g);        
        Graphics2D g2 = (Graphics2D)g;  
        g2.drawOval(50, 50, 200, 50);
        //g2.drawImage(icon.getImage(), 0, 0, null);              
    }
}

Open in new window

iphoneAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

TrigunaCommented:
setZOrder(0);
0
TrigunaCommented:
set your frame Always on Top. So that you can make sure that your application is on top of everything. Hope this helps.
0
TrigunaCommented:
ZOrder is an vb method. setAlwaysOnTop(true) is the Java method.
0
CPColinSenior Java ArchitectCommented:
Sun's website has a good tutorial on this, including a few tips to keep in mind:

http://java.sun.com/docs/books/tutorial/extra/fullscreen/exclusivemode.html

This page shows you other things you can do when in full-screen mode:

http://java.sun.com/docs/books/tutorial/extra/fullscreen/index.html
0
javaexpertoCommented:
in order to maximize(full screen) your JFrame try this:


setExtendedState(JFrame.MAXIMIZED_BOTH);

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.