How to remove the title bar of a frame(java.awt.Frame)?

How to get a frame without any TitleBar?

setUndecorated(true);
This also gets rid of the minimize, normalize, and close buttons from the upper right corner of the screen--so have a way to close and resize if you need it.
btw: do you know how to bring up the API docs?

Similar Messages

  • How do I remove the title bar from a Palm PDA front panel?

    On several PDA screens, I need all the real esate I can get. The title bar chews up a lot of it.  Is there any way, in the vi settings or programmatically, that I can remove the title bar?
    I've already tried the obvious step of unchecking "window has a title bar" in the window appearance catagory of the vi properties.  No apparent effect is seen.

    Hello,
    It sounds like you are referring to the GUI actually on your Palm devices.  I believe on Palm devices all applications have a title bar, and there isn't a way to get rid of it.  My guess is that perhaps this is a feature you can enable/disable as a Palm OS setting, or may simply be the way the Palm has defined its user interface.  If you have your Palm devices handy, check out the display settings to see any has an option to remove the title bars in general.  If you find out either way, definitely repost so the community can find the answer here as well!
    Thank you,
    Best Regards,
    JLS
    Best,
    JLS
    Sixclear

  • Removing the title bar

    Hello,
    I saw in an earlier post that it is much easier to remove the title bar
    in 2.0 and that how to do it is in the documentation. Where would this
    be documented? All I've figured out how to do so far is make the title
    bar, title text, and banner bar be the same color as the background. So
    they look invisible, except there is an icon that shows up even though
    there is no reference to an icon.
    Thanks,
    Leila

    Hi Leila.
    If you edit your portlet through the admin tool - just don't specify a
    title bar url or delete the one that is there. This will get rid of the
    title bar.
    Cindy
    Leila Schneberger wrote:
    Hello,
    I saw in an earlier post that it is much easier to remove the title bar
    in 2.0 and that how to do it is in the documentation. Where would this
    be documented? All I've figured out how to do so far is make the title
    bar, title text, and banner bar be the same color as the background. So
    they look invisible, except there is an icon that shows up even though
    there is no reference to an icon.
    Thanks,
    Leila

  • How to customize the title bar on my own Look And Feel?

    Hi all!
    I am creating my own Look and Feel which extends from NimbusLookAndFeel. What I'm doing is overwriting UIDefaults values??, referring to the Painters. For example:
    +uiDefault.put ("Button [Enabled]", new ButtonEnabledPainter());+
    But now I need is to customize the title bar of the JFrame's, but I do not see this option in Painter's values ??can be overwritten by Nimbus (http://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/_nimbusDefaults . html).
    You know as possible? I have to overwrite an existing UI component? The idea is I want to make the look and feel like SeaGlass, but the code seems a bit complex to know where to begin.
    I hope you can guide me on this issue.
    Thank you very much for everything! And excuse my English!.
    Greetings!

    very simple example, with direct methods
    import java.awt.*;
    import java.awt.event.*;
    import java.util.LinkedList;
    import java.util.Queue;
    import javax.swing.*;
    public class NimbusBorderPainterDemo extends JFrame {
        private static final long serialVersionUID = 1L;
        private JFrame frame = new JFrame();
        private JPanel fatherPanel = new JPanel();
        private JPanel contentPanel = new JPanel();
        private GradientPanel titlePanel = new GradientPanel(Color.BLACK);
        private JLabel buttonPanel = new JLabel();
        private Queue<Icon> iconQueue = new LinkedList<Icon>();
        public NimbusBorderPainterDemo() {
            iconQueue.add(UIManager.getIcon("OptionPane.errorIcon"));
            iconQueue.add(UIManager.getIcon("OptionPane.informationIcon"));
            iconQueue.add(UIManager.getIcon("OptionPane.warningIcon"));
            iconQueue.add(UIManager.getIcon("OptionPane.questionIcon"));
            JButton button0 = createButton();
            button0.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    frame.setExtendedState(ICONIFIED);
            JButton button1 = createButton();
            button1.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    frame.setExtendedState(MAXIMIZED_BOTH | NORMAL);
                }//quick implemented, not correct you have to override both methods
            JButton button2 = createButton();
            button2.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    int confirm = JOptionPane.showOptionDialog(frame,
                            "Are You Sure to Close Application?", "Exit Confirmation",
                            JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE,
                            null, null, null);
                    if (confirm == JOptionPane.YES_OPTION) {
                        System.exit(1);
            buttonPanel.setLayout(new GridLayout(0, 3, 5, 0));
            buttonPanel.setPreferredSize(new Dimension(160, 30));
            buttonPanel.add(button0);// JLabel is best and cross_platform JComponents
            buttonPanel.add(button1);// not possible put there witouth set Dimmnesion
            buttonPanel.add(button2);// and LayoutManager, work in all cases better
            titlePanel.setLayout(new BorderLayout());//than JPanel or JCompoenent
            titlePanel.add(new JLabel(nextIcon()), BorderLayout.WEST);
            titlePanel.add(new JLabel("My Frame"), BorderLayout.CENTER);
            titlePanel.setBorder(BorderFactory.createLineBorder(Color.GRAY));
            titlePanel.add(buttonPanel, BorderLayout.EAST);
            JTextField field = new JTextField(50);
            JButton btn = new JButton("Close Me");
            btn.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    System.exit(1);
            contentPanel.add(field);
            contentPanel.add(btn);
            fatherPanel.setLayout(new BorderLayout());
            fatherPanel.add(titlePanel, BorderLayout.NORTH);
            fatherPanel.add(contentPanel, BorderLayout.CENTER);
            frame.setUndecorated(true);
            frame.add(fatherPanel);
            frame.setLocation(50, 50);
            frame.pack();
            frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
            frame.setVisible(true);
            ComponentMover cm = new ComponentMover(frame, titlePanel);
            //by camickr http://tips4java.wordpress.com/2009/06/14/moving-windows/
        private JButton createButton() {
            JButton button = new JButton();
            button.setBorderPainted(false);
            button.setBorder(null);
            button.setFocusable(false);
            button.setMargin(new Insets(0, 0, 0, 0));
            button.setContentAreaFilled(false);
            button.setIcon(nextIcon());
            button.setRolloverIcon(nextIcon());
            button.setPressedIcon(nextIcon());
            button.setDisabledIcon(nextIcon());
            nextIcon();
            return button;
        private Icon nextIcon() {
            Icon icon = iconQueue.peek();
            iconQueue.add(iconQueue.remove());
            return icon;
        private class GradientPanel extends JPanel {
            private static final long serialVersionUID = 1L;
            public GradientPanel(Color background) {
                setBackground(background);
            @Override
            public void paintComponent(Graphics g) {
                super.paintComponent(g);
                if (isOpaque()) {
                    Color background = new Color(168, 210, 241);
                    Color controlColor = new Color(230, 240, 230);
                    int width = getWidth();
                    int height = getHeight();
                    Graphics2D g2 = (Graphics2D) g;
                    Paint oldPaint = g2.getPaint();
                    g2.setPaint(new GradientPaint(0, 0, background, width, 0, controlColor));
                    g2.fillRect(0, 0, width, height);
                    g2.setPaint(oldPaint);
        public static void main(String[] args) {
            SwingUtilities.invokeLater(new Runnable() {
                @Override
                public void run() {
                    try {
                        UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
                    } catch (Exception fail) {
                    UIManager.getLookAndFeelDefaults().put("nimbusFocus", Color.RED);
                    NimbusBorderPainterDemo nimbusBorderPainterDemo = new NimbusBorderPainterDemo();
    }

  • How to change the title bar wdith , scroll bar widths in tune with a 7" screen

    can you please help me customize my user chrome section so that I can REDUCE the WIDTH of the scroll bar ( horizontal and vertical ) . That is , at max the scroll bar can be ___ pixels of __ % of total width. ( prefer the relative reference )
    Also the title bar ( that black surrounding area that bears the minimize, maximize,close buttons ) needs its width reduced to half of what it is now. How do I do this ?

    No. That doesn't work any more. In current Firefox versions native scroll bars are used and you can't do style those via userChrome.css (user interface; chrome windows) and userContent.css (websites). You can try a large theme if you do not want to make the changes via the Control Panel

  • How to Translate the Title bars into other languages.

    Hi,
    I have created a titles using the SET Title statement.  I want to translate the title into other languages.  Please help me ASAP.
    Thanks,
    Sreenivas.

    Hi,
    From SE38, GOTO (from menu bar)-->translation.
    Regards,
    Jyothi CH.

  • How to prevent the automatic full-white repainting of an AWT Frame?

    Using Java 1.6.0, Windows XP, 1.6.0-b105 Client VM I have the following problem:
    I made a double buffered AWT frame. But it still flashes sometimes. It gives one flash about 6 seconds after start of application. There seems to be an incoming event "for no discernible reason". I have overridden all paint/repaint/update methods in my Frame sub class.
    These unwanted flashes are caused by the AWT painting the frame in white and then calling paint.
    I may have caught these weird calls:
    The good/normal case looks like:
    java.lang.Exception: Stack trace
    at java.lang.Thread.dumpStack(Thread.java:1206)
    at xed.xed_Frame.paint(xed_Frame.java:125)
    at xed.xed_Frame.update(xed_Frame.java:119)
    at sun.awt.RepaintArea.updateComponent(RepaintArea.java:239)
    at sun.awt.RepaintArea.paint(RepaintArea.java:216)
    at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:301)
    at java.awt.Component.dispatchEventImpl(Component.java:4486)
    at java.awt.Container.dispatchEventImpl(Container.java:2116)
    at java.awt.Window.dispatchEventImpl(Window.java:2429)
    at java.awt.Component.dispatchEvent(Component.java:4240)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
    The differences in the bad case: (Not all traces of this kind cause the flashing. But after all flashes there seems to be such a trace.)
    at xed.xed_Frame.paint(xed_Frame.java:125)
    at sun.awt.RepaintArea.paintComponent(RepaintArea.java:248)
    at sun.awt.RepaintArea.paint(RepaintArea.java:224)
    at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:301)
    So how do I stop these unwanted white redraws of the Frame?

    Accidentally found the answer:
    System.setProperty("sun.awt.noerasebackground", "true");

  • How to remove the search bar in the tab strip?

    My latest firefox update includes a search bar IN THE TAB STRIP on top of the page (not the one in the navigation toolbar). It takes up too much space for the tabs and it is useless (since there is already a search bar below it in the navigation toolbar). How do I remove it?

    I was able to fix the problem in Safe Mode. It was an extension disguised as a Firefox original part, named itself as "firefox default tabs." I am not sure how I got it since I have not downloaded anything recently. My Kaspersky did not block anything as well. But, huge thanks!

  • How to remove the search bar from new tab page?

    I've added extra pinned site rows and columns on the new tab page.
    The new search bar is redundant and space hogging.
    Please provide how to disable in step by step instructions :)
    Edit:
    Answer
    1. Go to Firefox Profile Folder (go to about:support in Firefox then click Open folder/Show in Finder to get there)
    2. Open or create the chrome folder in the Firefox Profile Folder.
    3. Create a blank text file, copy and paste this code into the text file.
    @-moz-document url(about:newtab)
    #newtab-search-container, #newtab-search-logo { display:none !important; }
    #newtab-margin-top, #newtab-search-container { display:none!important; }
    4. Save it as userContent.css (using ALL FILES under the drop down menu)
    5. Place the new css file into the chrome folder.

    Fox_1923: You're not supposed to create a new chrome file but a <b>userContent.css</b> file in the <b>chrome</b> folder.
    You can use mine and <b>cor-el's</b> code together in the userContent.css file to get rid of the large margin in the top along with the search box. I've used it just fine in the latest Nightly and so have others who dislike the search box.
    One thing you could be doing wrong is not setting the file type to all Files and Notepad or whatever else you are using is adding an unneeded extension (for Windows, .txt = userContent.css.txt doesn't work!)
    See this for clarification:
    <img src="http://i.imgur.com/cZDH9vy.png" title="Hosted by imgur.com" /

  • How to blink jframe title bar?

    hi, i have an application i dont know how to blink the title bar of the frame when it is minimized. I hope you can help me. Thanx in advance.

    When the frame doesnt have focus
    you can use
    yourFrame.setVisible(true);
    and it will blink similar to the MSN Messenger on the task bar..
    It works well on XP, 98 n ME.. I havent tried on 2000 but i use it for the messenger I developed and it works absolutely fine
    Hope it helped
    Boney S.
    [email protected]

  • Hiding the Title Bar

    is there any way to hide the title bar in the frame or dialog.
    This is because i dont want the user to close the window from the title bar by right clicking it or clicking the X.

    Both Frame and Dialog have the method below which removes the title bar and border. JFrame and JDialog inherit this method.
    public void setUndecorated(boolean undecorated)

  • How can we remove the scroll bars from the table?

    Hi,
    I have a dynamic table. Currently the table appears with the scroll bars. But there is a requirement that the scroll bar should not appear and the table should stretch in the entire page. How can this be achieved.
    Thanks in advance
    Nita

    Thanks Mohammad for the reply.
    Was able to remove the scroll bars by using only the styleClass as AFStretchWidth. But there is a default partition in middle of the page still? Can i remove that too by any way.

  • How to replace the icon in the title bar and minimized window

    I am not sure if this is a Swing question. But since nobody answered it in the Java Programming forum, let me place it here:
    I would like to set my own icon in the title bar and in the minimized window of my java application, replacing the java coffee cup icon.
    I am using:
    frame.setIconImage(new ImageIcon("image.gif").getImage())
    as was suggested previously in the Java Programming forum at:
    http://forum.java.sun.com/thread.jspa?forumID=31&threadID=5212059
    This does create the icon in both places. However, it only works when I run the program from JBuilder 2006. It doesn't work if I run the program from the .jar or the .exe file.
    How can I make it work for my .jar and .exe file?
    Please help! Thanks!

    It doesn't work if I run the program from the .jar...working example for a .jar
    import javax.swing.*;
    import java.awt.*;
    class Testing
      public void buildGUI()
        JFrame f = new JFrame();
        Image img;
        try
          java.net.URL url = new java.net.URL(getClass().getResource("Save.gif"), "Save.gif");//correct capitalization required
          if (url != null)
            img = javax.imageio.ImageIO.read(url);
            f.setIconImage(img);
        catch(Exception e){}//do nothing - default will display
        f.setSize(200,200);
        f.setLocationRelativeTo(null);
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        f.setVisible(true);
      public static void main(String[] args)
        SwingUtilities.invokeLater(new Runnable(){
          public void run(){
            new Testing().buildGUI();
    }

  • How do I remove the coloured bars from running down the side of my emails.

    How do I remove the coloured bars from running down the side of my emails.

    Hi
    The setting I have in Composing are-
    Composing
    Message Format - Rich Text
    In addressingonly have  tick in When sending to a group
    Responding - tick only the first two boxes
    Last only the bullet for Include selected text
    Hope htis helps

  • How do you make the title bar display different text than the page title?

    I'm looking for a way for the title bar display of my web page to be different than the text in the actual nav bar created by iWeb. For instance, I'd like the nav bar to just say Home for my main page, but in the title bar in the browser say "blah blah blah."
    I know there has to be a way to do this. iWeb has actually done it on one page already, but I can't figure out how. I think it picked up the title bar text from the first text box in the page. For instance, the page name in the navigation bar is "blahs for today" but the browser title bar when you open that page says "blah blah," which happens to be the first line of text on the page. The page title in iWeb.app, though, is "blahs for today." But if I look at the source code it lists title as "blah blah."
    I'm guessing I might be able to work around by making an invisible text box with the text that I want in the title bar as the very first thing on the page, and hope iWeb makes that the title bar text. I'd rather have a more correct way of doing it.
    Is there a way of doing this in the source code without having to change a lot of stuff?
    Thanks for any help.

    Richard Kirkman1 wrote:
    I think it picked up the title bar text from the first text box in the page. (...) I'm guessing I might be able to work around by making an invisible text box with the text that I want in the title bar...
    Richard ~ The key is the default Title box that iWeb creates for every new page — it's that which you need to edit, not another text box you've created. And to make the text in that Title box invisible, see here.

Maybe you are looking for