Hi, I want to create a frame which does not contain the title bar. Can it be possible? If yes then please reply me with the source code of it. I need this source code as soon as possible.
Hi, I want to create a frame which does not contain the title bar. Can it be possible? If yes then please reply me with the source code of it. I need this source code as soon as possible.
Hi, you need to use the following code to remove the title bar form the frame. It will solve your problem.
Code:import javax.swing.*; public class titlebarremover { public static void main(String[] args) { JFrame frame = new JFrame("Remove Title Bar of a Frame"); frame.setUndecorated(true); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setSize(200,200); frame.setVisible(true); } }
Hi, I am giving you a code which will remove the title bar of a frame in java by using the java.awt package.
Code:import java.awt.*; import java.awt.event.*; public class WithoutTitleFrame { public static void main(String[] args) { Frame frame = new Frame("Without Title Bar Frame"); Label lbl = new Label("Welcome techarena solutions forum",Label.CENTER); frame.setUndecorated(true); frame.add(lbl); frame.setSize(800,800); frame.setVisible(true); frame.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent we) { Frame frame = (Frame)we.getSource(); frame.dispose(); } }); } }
Hello, you want to Remove Title Bar of a Frame in Java, then it is very easy, just use one method, as I have done follow:
Code:import java.awt.Frame; public class Main { public static void main() { Frame frame = new Frame(); frame.setUndecorated(true); boolean undecorated = frame.isUndecorated(); } }
Hi, there is a way in java to remove the title bar and other decorations from a frame. A frame looks and behave like a window container without decorations. But if you don't want the title bar then it is better to use a Window container. You can remove the decorations while the frame is not visible. To remove those decorations just make use of following method:
Code:Frame applicationframe = new Frame(); applicationframe.setUndecorated(true);
Bookmarks