public class MyJFrame extends JFrame{ public MyJFrame() { setUndecorated(true); } }
Tutorials, tips and tricks about java programming language. Answers for many doubts about java programming language. Answering many howtos. Sample java projects and source code, java games, java programs for java practical labs.
How to Remove Title bar from JFrame of Java Application
To remove the title bar completely, there is a method called setUndecorated() in java. It takes a boolean variable. If the boolean is true, the title bar will be removed. The following one is an example. The method setUndecorated() invoked with a true boolean argument, will remove the title bar from the JFrame MyJFrame. The method is called here from the constructor. You may call it anywhere from within the class scope.
After removing title bar, you may add your own buttons for closing, maximization and minimization of the window.
No comments:
Post a Comment