Hide/remove titlebar of JInternalframe

Hide/remove titlebar of JInternalframe

View Answers

July 28, 2008 at 1:51 PM

Hi friend,

using this
javax.swing.plaf.InternalFrameUI ifu= iFrame.getUI();
((javax.swing.plaf.basic.BasicInternalFrameUI)ifu).setNorthPane(null);

to remove the titlebar run this code. i am sending running program.


Here is the complete code:

import javax.swing.*;
import java.awt.event.*;
import java.awt.*;
import javax.swing.JLabel;

public class RemoveTitleBar
extends JFrame {


public RemoveTitleBar() {
super("Frame Without TitleBar");


JInternalFrame iFrame = new JInternalFrame();


// Get the titlebar and set it to null
setRootPaneCheckingEnabled(false);
javax.swing.plaf.InternalFrameUI ifu= iFrame.getUI();
((javax.swing.plaf.basic.BasicInternalFrameUI)ifu).setNorthPane(null);



iFrame.setBounds(30,30,200,200);
iFrame.setVisible(true);


JDesktopPane jp = new JDesktopPane();
jp.add(iFrame);
setContentPane(jp);
}

public static void main(String[] args){
RemoveTitleBar rtb = new RemoveTitleBar();
rtb.setBounds(20,20,400,400);
rtb.setVisible(true);
rtb.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
}

----------------------------------------------------------

Read for more information about swing at:


http://www.roseindia.net/java/example/java/swing/


Thanks.









Related Tutorials/Questions & Answers:
Hide/remove titlebar of JInternalframe - Java Beginners
Hide/remove titlebar of JInternalframe  i am designing a account management application using java. so to give good look i want to hide/remove...)ifu).setNorthPane(null); to remove the titlebar run this code. i am sending
how to change color of titlebar in java
how to change color of titlebar in java  pls help
Advertisements
Version of cn.bingoogolapple>bga-titlebar dependency
List of Version of cn.bingoogolapple>bga-titlebar dependency
how to use a JInternalFrame in a JFrame to create a chat window in a client/server app?
how to use a JInternalFrame in a JFrame to create a chat window in a client/server app?  how to use a JInternalFrame within a JFrame? i want... chatting in facebook). 1.how to use JInternalFrame for this? 2.do you suggest any
Maven Dependency bga-titlebar >> 1.0.5
You should include the dependency code given in this page to add Maven Dependency of cn.bingoogolapple >> bga-titlebar version1.0.5 in your project
Maven Dependency bga-titlebar >> 1.0.8
You should include the dependency code given in this page to add Maven Dependency of cn.bingoogolapple >> bga-titlebar version1.0.8 in your project
Maven Dependency bga-titlebar >> 1.0.2
You should include the dependency code given in this page to add Maven Dependency of cn.bingoogolapple >> bga-titlebar version1.0.2 in your project
Maven Dependency bga-titlebar >> 1.0.6
You should include the dependency code given in this page to add Maven Dependency of cn.bingoogolapple >> bga-titlebar version1.0.6 in your project
Maven Dependency bga-titlebar >> 1.0.1
You should include the dependency code given in this page to add Maven Dependency of cn.bingoogolapple >> bga-titlebar version1.0.1 in your project
Maven Dependency bga-titlebar >> 1.0.3
You should include the dependency code given in this page to add Maven Dependency of cn.bingoogolapple >> bga-titlebar version1.0.3 in your project
Maven Dependency bga-titlebar >> 1.0.4
You should include the dependency code given in this page to add Maven Dependency of cn.bingoogolapple >> bga-titlebar version1.0.4 in your project
Maven Dependency bga-titlebar >> 1.0.0
You should include the dependency code given in this page to add Maven Dependency of cn.bingoogolapple >> bga-titlebar version1.0.0 in your project
Maven Dependency bga-titlebar >> 1.0.7
You should include the dependency code given in this page to add Maven Dependency of cn.bingoogolapple >> bga-titlebar version1.0.7 in your project
how to open jdialog form in jinternalframe and transfer data from jdialog to jinternalform and vice-versa - Java Beginners
how to open jdialog form in jinternalframe and transfer data from jdialog to jinternalform and vice-versa  hi....... i am developing simple... dialog frame from jinternalframe any transfering record between jinternalframe
jumping frame jFrame to jInternalframe
Maven Repository/Dependency: cn.bingoogolapple | bga-titlebar
Maven Repository/Dependency of Group ID cn.bingoogolapple and Artifact ID bga-titlebar. Latest version of cn.bingoogolapple:bga-titlebar dependencies. # Version Release Date 1
Maven dependency for cn.bingoogolapple - bga-titlebar version 1.0.0 is released. Learn to use bga-titlebar version 1.0.0 in Maven based Java projects
-titlebar released The developers of   cn.bingoogolapple - bga-titlebar..., the released version of  cn.bingoogolapple - bga-titlebar library is 1.0.0. Developer can use this version ( cn.bingoogolapple - bga-titlebar version 1.0.0
Maven dependency for cn.bingoogolapple - bga-titlebar version 1.0.1 is released. Learn to use bga-titlebar version 1.0.1 in Maven based Java projects
-titlebar released The developers of   cn.bingoogolapple - bga-titlebar..., the released version of  cn.bingoogolapple - bga-titlebar library is 1.0.1. Developer can use this version ( cn.bingoogolapple - bga-titlebar version 1.0.1
Maven dependency for cn.bingoogolapple - bga-titlebar version 1.0.3 is released. Learn to use bga-titlebar version 1.0.3 in Maven based Java projects
-titlebar released The developers of   cn.bingoogolapple - bga-titlebar..., the released version of  cn.bingoogolapple - bga-titlebar library is 1.0.3. Developer can use this version ( cn.bingoogolapple - bga-titlebar version 1.0.3
Maven dependency for cn.bingoogolapple - bga-titlebar version 1.0.4 is released. Learn to use bga-titlebar version 1.0.4 in Maven based Java projects
-titlebar released The developers of   cn.bingoogolapple - bga-titlebar..., the released version of  cn.bingoogolapple - bga-titlebar library is 1.0.4. Developer can use this version ( cn.bingoogolapple - bga-titlebar version 1.0.4
Maven dependency for cn.bingoogolapple - bga-titlebar version 1.0.5 is released. Learn to use bga-titlebar version 1.0.5 in Maven based Java projects
-titlebar released The developers of   cn.bingoogolapple - bga-titlebar..., the released version of  cn.bingoogolapple - bga-titlebar library is 1.0.5. Developer can use this version ( cn.bingoogolapple - bga-titlebar version 1.0.5
Maven dependency for cn.bingoogolapple - bga-titlebar version 1.0.6 is released. Learn to use bga-titlebar version 1.0.6 in Maven based Java projects
-titlebar released The developers of   cn.bingoogolapple - bga-titlebar..., the released version of  cn.bingoogolapple - bga-titlebar library is 1.0.6. Developer can use this version ( cn.bingoogolapple - bga-titlebar version 1.0.6
Maven dependency for cn.bingoogolapple - bga-titlebar version 1.0.7 is released. Learn to use bga-titlebar version 1.0.7 in Maven based Java projects
-titlebar released The developers of   cn.bingoogolapple - bga-titlebar..., the released version of  cn.bingoogolapple - bga-titlebar library is 1.0.7. Developer can use this version ( cn.bingoogolapple - bga-titlebar version 1.0.7
Maven dependency for cn.bingoogolapple - bga-titlebar version 1.0.8 is released. Learn to use bga-titlebar version 1.0.8 in Maven based Java projects
-titlebar released The developers of   cn.bingoogolapple - bga-titlebar..., the released version of  cn.bingoogolapple - bga-titlebar library is 1.0.8. Developer can use this version ( cn.bingoogolapple - bga-titlebar version 1.0.8
Maven dependency for cn.bingoogolapple - bga-titlebar version 1.0.2 is released. Learn to use bga-titlebar version 1.0.2 in Maven based Java projects
-titlebar released The developers of   cn.bingoogolapple - bga-titlebar..., the released version of  cn.bingoogolapple - bga-titlebar library is 1.0.2. Developer can use this version ( cn.bingoogolapple - bga-titlebar version 1.0.2
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for bga-titlebar version 1.0.8
-titlebar version 1.0.8. You can add these depency in your project to get cn.bingoogolapple:bga-titlebar:1.0.8 Java library in your project.. Maven, Gradle, SBT, Ivy, Grape, Leiningen and  Buildr Dependency for bga-titlebar version 1.0.8
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for bga-titlebar version 1.0.7
-titlebar version 1.0.7. You can add these depency in your project to get cn.bingoogolapple:bga-titlebar:1.0.7 Java library in your project.. Maven, Gradle, SBT, Ivy, Grape, Leiningen and  Buildr Dependency for bga-titlebar version 1.0.7
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for bga-titlebar version 1.0.6
-titlebar version 1.0.6. You can add these depency in your project to get cn.bingoogolapple:bga-titlebar:1.0.6 Java library in your project.. Maven, Gradle, SBT, Ivy, Grape, Leiningen and  Buildr Dependency for bga-titlebar version 1.0.6
frames - Java3D
Friend, You can use JInternalFrame class to create multiple frames in java as we... MultipleFrames{ JDesktopPane desk; JInternalFrame frame1,frame2,frame3,frame4...); desk = new JDesktopPane(); frame1 = new JInternalFrame("Frame1",true
printing in java
printing in java  hello i want to print a jInternalframe containing some lebels,but my printer sent me a paper with the following written on it: please what is the problem
How to create Multiple Frames using Java Swing
frame by providing the class JInternalFrame. With the use of this class, you can... MultipleFrames { JDesktopPane desk; JInternalFrame frame1, frame2, frame3..._ON_CLOSE); desk = new JDesktopPane(); frame1 = new JInternalFrame("Frame1", true
Problem when resizing the form - Swing AWT
resizing the form. I have a JTextPane on the JInternalFrame which occupy all... application which have a menu item New which adds My New JInternalFrame form to the desktopPane. The JInternalFrame has the JTextPane which is occuping the all
How To Create Internal Frames In Java
_TO_REPLACE_1 Constructor Detail Description JInternalFrame() This constructor..., resize, close and non-iconifiable. JInternalFrame(String title..., resize, close and non-iconifiable. JInternalFrame(String title, boolean
java swing
frames; private JInternalFrame createFrame(final Image image) { final JInternalFrame frame = new JInternalFrame("Picture "); frame.add
java swing
on jinternalframe and connect to mysql. import java.io.*; import java.sql.*; import java.awt....()); } private static int frames; private JInternalFrame createFrame() { final JInternalFrame frame = new JInternalFrame("Form
New Problem in Form Resizing - Swing AWT
which have a menu item New which adds My New JInternalFrame form to the desktopPane. The JInternalFrame has the JTextPane which is occuping the all of the JInternalFrame form space at initial stage. at initial stage the code part
Window State - Swing AWT
button, there is Restore button present in the Titlebar and user can restore
Causing Deadlocks in Swing Code
. But the  JInternalFrame is also started with main Thread  at the Same... JInternalFrame(); } // Static Block static { new DeadLockClaz... the new JInternalFrame();. But one thing you can do to change our static block
Create a Desktop Pane Container in Java
the desktop pane container: JInternalFrame(String iframe_title, Boolean resizable, Boolean closable, Boolean maximizable, Boolean minimizable ): JInternalFrame(): This is the constructor of JInternalFrame class. It extends from
java swings - Java Beginners
e) { JInternalFrame aa=new JInternalFrame("Frame2",true,true,true,true
cylinder.java - Java Beginners
; } public static double validateDouble(String prompt, String titleBar...; do { inputString = JOptionPane.showInputDialog(null, prompt, titleBar
What is Java Swing?
. DesktopManager This interface has JDesktopPane object. The JInternalFrame... like: JFrame, JInternalFrame and JWindow etc.  Scrollable... has the JInternalFrame for creating the internal fame in a frame
Design and Implement GPA Calculator
{ JFrame frame; JInternalFrame jInternalFrame; JLabel headingLabel... displayStudentRecord() { jInternalFrame = new JInternalFrame("Student Record", true...); jInternalFrame.add(gpValue); desktop.add(jInternalFrame
Need Help with Java-SWING progrmming - Swing AWT
extends JInternalFrame implements Printable{ private JPanel headPanel,buttonPanel
GUI - Java Beginners
ActionListener { //Connection con= null; JDesktoppane desk; JInternalFrame
Getting all frames in a JDesktopPane container
++){   iframe = new JInternalFrame("Internal 

Ads