Home Answers Viewqa Java-Beginners 1923-Hide Hide/remove titlebar of JInternalframe

 
 


pankaj
Hide/remove titlebar of JInternalframe
1 Answer(s)      4 years and 10 months ago
Posted in : Java Beginners

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 Pages:
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
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
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
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: "www.java2s.com" 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
Window State - Swing AWT
button, there is Restore button present in the Titlebar and user can restore
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
Causing Deadlocks in Swing Code,java newsletter,java,tutorial
. 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
cylinder.java - Java Beginners
; } public static double validateDouble(String prompt, String titleBar...; do { inputString = JOptionPane.showInputDialog(null, prompt, titleBar
Create a Desktop Pane Container in Java
container: JInternalFrame(String iframe_title, Boolean resizable, Boolean closable, Boolean maximizable, Boolean minimizable ): JInternalFrame(): This is the constructor of JInternalFrame class. It extends from the JComponent
Summary - GUI Containers
(); Constructor w = new JFrame(t); Constructor. Sets titlebar to t. w.setTitle(t); Sets titlebar text to t w.setDefaultCloseOperation(opt.../false); Make visible (and start GUI thread) or hide. w.pack
java swings - Java Beginners
e) { JInternalFrame aa=new JInternalFrame("Frame2",true,true,true,true
JOptionPane - More Dialogs
, "Party Poll" // title in titlebar
What is Java Swing?
This interface has JDesktopPane object. The JInternalFrame implements..., JInternalFrame and JWindow etc.  Scrollable This interface... the JInternalFrame for creating the internal fame in a frame. DefaultFocusManager
Containers
) for displaying toolbars. Other: JInternalFrame (if you need a window inside a window
First Window
, minimizing, titlebar, etc, however by default a close box
Need Help with Java-SWING progrmming - Swing AWT
extends JInternalFrame implements Printable{ private JPanel headPanel,buttonPanel
Summary - Basic GUI Elements
(t); Sets titlebar text to t w.setDefaultCloseOperation(opt); Use opt
GUI - Java Beginners
ActionListener { //Connection con= null; JDesktoppane desk; JInternalFrame
Getting all frames in a JDesktopPane container
;= new JInternalFrame("Internal Frame: " + j

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.