Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



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

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


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



Advertisement
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
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
Window State - Swing AWT
button, there is Restore button present in the Titlebar and user can restore
How To Create Internal Frames In Java
, closable/not closable internal frame. Constructors Of JInternalFrame Constructor Detail Description JInternalFrame() This constructor creates... and non-iconifiable. JInternalFrame(String title) This constructor creates
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
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 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
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
cylinder.java - Java Beginners
; } public static double validateDouble(String prompt, String titleBar...; do { inputString = JOptionPane.showInputDialog(null, prompt, titleBar
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
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
java swings - Java Beginners
e) { JInternalFrame aa=new JInternalFrame("Frame2",true,true,true,true
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
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
Getting all frames in a JDesktopPane container
;= new JInternalFrame("Internal Frame: " + j
GUI - Java Beginners
ActionListener { //Connection con= null; JDesktoppane desk; JInternalFrame
 

 

 

DMCA.com