This is a discussion on how can i disable the title bar in JInternalFrame within the Java Programming forums, part of the Software Development category; can anyone say me, how can i hide or remove the title bar in JInternalFrame?...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| title bar is actually a north pane which is an instance of a BasicInternalFrameTitlePane. Setting this north pane to a null value will remove the title bar from a JInternalFrame. The following Java program demonstrates how to remove the title bar: Code:
import javax.swing.*;
import java.awt.event.*;
import java.awt.*;
public class Frame_Without_Titlebar
extends JFrame {
public Frame_Without_Titlebar() {
super("InternalFrame Without TitleBar");
JInternalFrame frame = new JInternalFrame();
// Get the titlebar and set it to null
setRootPaneCheckingEnabled(false);
javax.swing.plaf.InternalFrameUI ui
= frame.getUI();
((javax.swing.plaf.basic.BasicInternalFrameUI)ui).setNorthPane(null);
frame.setBounds(30,30,200,200);
frame.setVisible(true);
JDesktopPane desktop = new JDesktopPane();
desktop.add(frame);
setContentPane(desktop);
}
public static void main(String[] args)
{
Frame_Without_Titlebar frame = new
Frame_Without_Titlebar();
frame.setBounds(30,30,300,300);
frame.setVisible(true);
}
}
__________________ cheers Aman |
| |||
| thanks sundar i have been searching for this one since last month. i have checked this and its working well. and say me an another one, now i am doing an application for intranet with more than 15 system. which is best for distributed application rmi application or java web application. |
| |||
| Quote:
i hope you know this well. i need to display an close button on top of the tab pane when i click the button the tab pane must be close. like some IDE s. i need to create application with multiple window under a single window. |
| |||
| Quote:
Quote:
Code: JTabbedPane tabbedPane = new JTabbedPane();
ImageIcon icon = createImageIcon("image.gif");
JComponent panel1 = makeTextPanel("Panel #1");
tabbedPane.addTab("Tab 1", icon, panel1,
"Does nothing");
tabbedPane.setMnemonicAt(0, KeyEvent.VK_1); To switch to a specific tab, the user clicks it with the mouse or just press Alt-1. here in the above code setMnemonicAt(0, KeyEvent.VK_1) makes '1' the mnemonic for the respective tab hence by pressing Alt-1 makes the tab's component appear.apply the above code in ur application and set this for appearing new window (requirement for your application)...hope this would help you .... To switch to a specific tab programmatically, use the setSelectedIndex or the setSelectedComponent methods.
__________________ cheers Aman Last edited by amansundar : 03-26-2008 at 05:01 AM. |
| |||
| Quote:
|
| |||
| hai amansundar! again this is kamal. you have just created a tab with an image. i need to add a close button on the tab. if i click the close button the tab must be close. and when i select an menu option that shows me the tab again. please find a way for me. Thanks kamal |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How do I change another window's title, that is, the content of title bar at the top | itbarota | HTML, CSS and Javascript Coding Techniques | 1 | 09-13-2007 02:02 AM |
| How to give bug title & bug description fo ODD division? | devarajan.v | Quality Engineering and Methodologies | 1 | 07-26-2007 11:14 PM |
| How to Dynamically Setting the Page's Title in ASP.NET 2.0? | Archer | C# Programming | 1 | 07-23-2007 11:35 PM |
| Title Tag Optimization Tips | vadivelanvaidyanathan | Search Engine Optimization | 0 | 03-30-2007 01:58 AM |
| SEO Optimization - Page Title | drecko | Search Engine Optimization | 2 | 02-19-2007 12:28 AM |