Getting the height of the title bar of a JInternalframe

Hi,
How can i get the height of the title bar of a JInternalframe??
Please reply asap.
Thanks
Jatin

Try this.
myFrame.getUI().getNorthPane().getHeight();

Similar Messages

  • Mac projector fullscreen without the title bar?

    Is that possible? I wrote a class to show my content full screen, but still get the title bar at the top when I open it on a mac.
    Can that be done?
    Thanks a lot!
    Here is the AS I have in my class:
    package com.viscira.utils.fullscreen
         import flash.display.MovieClip;
         import flash.display.StageDisplayState;
         import flash.display.Stage;
         import flash.display.StageScaleMode;
         public class FullScreen extends MovieClip
              public function FullScreen():void
              public function goFS():void
                   stage.displayState = StageDisplayState.FULL_SCREEN;
                   stage.scaleMode = StageScaleMode.NO_SCALE;

    JFrame frame=new JFrame();
    frame.setUndecorated(true);
    ...but then you get no titlebar AND no border
    so you'll have to add your own border if you want one.

  • How can I get back the title bar in Thunderbird 38?

    The title bar can be turned on and off in Firefox. In the current version of Thunderbird (31), the title bar is present by default and there is no option to turn it off. In the beta version (38), there is no title bar by default… but I can't believe that there's no way to get it back. So, where is this setting? I can't find it.

    I sure agree that the setting isn't easily discoverable, but that's too late for the 38.0 release given that string freezes went in effect already (the reason being that localizers have to translate all UI elements for their respective language).
    The respective [https://bugzilla.mozilla.org/show_bug.cgi?id=814571 bug report] has been up for more than two years, but thus far not much progress in terms of a solution acceptable by the developers. I don't know if the extension proposed in the last comment was ever developed and posted.

  • Any way to get at the title bar in JFrame?

    I'd like to either add a button to the title bar (title pane?) or override the behavior of the resize button. As far as I can tell, the LookNFeel classes don't allow you to add anything, just change colors, icons, etc. The WindowListener classes don't let you get at the resize button. I don't want to override Component.setSize() (that causes other problems), I just want to have the resize button do something different (or add another button).
    I'd appreciate any ideas!

    1) You could create your own frame that extends JWindow. This would be quite involved, since you'd need to make it respond to mouse drags, mouse resizing etc explicitly (if you wanted that functionality), but you would be able to add your own custom border, which you could make to look like a system border, or you could make comletely different.
    2) I don't know this could be persuaded to do what you want, but you could try adding a ComponentListener to the JFrame to check for resizes, and take action accordingly

  • How do I get the full current path in the title bar of a terminal window?

    Is it possible to get the full current path in the title bar of a
    terminal window? I would find that more meaningful than
    "Terminal - tcsh - 80x60" (which I currently get). Doing
    this would free me from wanting to display the path in my
    system prompt thereby allowing me to use a shorter prompt
    and having more space on the line for actual input.
    Thanks
    Ron
    Dual 1Ghz PowerMac G4 Quicksilver 2002   Mac OS X (10.4.8)  

    IIRC, Terminal->Window Settings->Window controls that information. That said, I don't understand what full current path means in this context, nor why you'd want to display it in title bar.
    Your terminal prompt is a concatenation of your computer name (SysPrefs->Sharing—easily changed) and the path to your user's home directory using the short username (hard to change).
    computer name:~ username$

  • After installing FF4 on 2 computers (both Win7Ultimate), one places tabs in the title bar, the other below it; how can I get both to place tabs in the title bar?

    I have the same options selected on each computer, both have "Tabs on top" selected.
    The one I am using now has a double-height title bar, with the Firefox botton on the top left, and tabs below it also on the left.
    The right side of the title bar is blank (semitransparent) space.

    Found the problem - on one computer, I run Firefox maximised, and Tabs go into the title bar.
    On the other, Firefox runs in an unmaximised window, and tabs sit below the title bar.
    This seems very silly.
    Hey, developers, how about keeping the tabs in the title bar all the time? This is a good feature spoilt by this quirk.
    How about changing it for the next update?

  • Getting rid or hide of the title bar without using jwidow

    hi everyone,
    is there any way to get rid or hide of the title bar in a Jframe without using JWindow because this one didn't conserve all the abilities a JFrame(listeners)...
    thanks in advance

    It is setUndecorated(true), but you'll need version 1.4 to use it. If you don't have it, then you use JWindow...
    http://java.sun.com/j2se/1.4/docs/api/javax/swing/JFrame.html

  • How to change the position of the title bar in XFCE?

    I hate widescreens, but I bought one because only those are sold. There's a problem with them - The amount of text you can fit on the screen horizontally is quite low which means less lines of text and more scrolling. Also, I noticed that at least 50px is taken up by misc title bars and menus. There would be much more space if I got rid of them.
    Unfortunately, getting rid of them is not an option. I need them. I was thinking that it perhaps would be possible to move the title bars of the windows to the side of the window. Mockup of how it would work included. Do you know of any such solution? That would really help.
    Mockup: http://yfrog.com/j4screenshotesp

    Already been requested ( http://xfce.wikia.com/wiki/Wish_List ) but not yet available AFAIK.

  • Can't drag windows around using the title bar-CS4

    I just upgraded to CS4 at work last week and I'm already regretting it. Firstly, using two monitors, CS4 must like my graphics card becasue as soon as I open a document and it begins to render the window, the main monitor loses it's signal and cuts off. So I have to hard shut down and make my 2nd monitor the main one, open CS4 and a file on that monitor, then make it the 2nd monitor and pass it over to my real first monitor with a file open and make that monitor the main one again. Added to that, randomly, files will open as tabs even though I have the option unchecked in prefs. I hate tabs, I want my windows floating. But I digress.
    My current issue is the file windows are not movable using the title bar. I can expand/contract every side grabbing the edge, but clicking, holding and dragging any of the title bar is ineffective. I can drag to tab to undock it, but once floating, the title bar is non-funtional for grabbing. I can also double click on it to tab, just not to drag.
    I use a mac at home and thankfully Adobe hasn't forced the edge to edge palette background on that platform. On the mac we get a 'classic view' or something that does away with the desktop blocking grey window background. Seriously, I can't stand the full screen look. Why can't windows have that option to have just the menu bar, palettes and file windows allowing the desktop to be visible? /rant

    A new video card is often a good idea if yours is over 2 years old.  Even the modern "budget" (e.g., ~$100) cards are hugely powerful nowadays.
    This page, I believe, could be a good starting point for everything you want to know:
    http://kb2.adobe.com/cps/404/kb404898.html
    This page, specifically, talks about tested video cards with Photoshop CS4:
    http://kb2.adobe.com/cps/405/kb405711.html
    A similar page for Photoshop CS5:
    http://kb2.adobe.com/cps/831/cpsid_83117.html
    -Noel

  • TextEdit won't let me rename duplicated .html files as a .html file (manually typing it) either in the Finder or the Title Bar by selecting Rename or Save.

    TextEdit won't let me rename duplicated .html files as a .html file (manually typing it) either in the Finder or the Title Bar by selecting Rename or Save.
    I am only able to rename a duplicated .html file right after I create it, because the file name gets highlighted in the Title Bar, but after that there is no recourse. I I can Rename or Save the file if I want to just save it as a .txt, but I need it to be .html. I guess I can manually change the file later, but it's really annoying.

    I remember long ago a similar issue with TextEdit, but I can't remember if there was a solution or not.
    Do you have it set to Display HTML files as HTML code and also deselect "When Saving a File: Add ".txt" extension to plain text files"

  • I want the tabs in the title bar on FF6.

    In FF 4, 5, and 6, until today, the tabs were in the title bar where I want them to be. Now they are below the title bar. How do I get them back into the title bar? In about:config, browser.tabs.drawInTitlebar; true.

    You would need an extension or code in userChrome.css to accomplish that.
    Try:
    *http://userstyles.org/
    * http://forums.mozillazine.org/viewtopic.php?f=23&t=2057009
    *http://userstyles.org/styles/42402 Firefox 4 Normal Window Tabs In Titlebar - Themes and Skins for Browser - userstyles.org
    <pre><nowiki>#main-window[tabsontop="true"][sizemode="normal"] #TabsToolbar {
    margin-left: 95px !important;margin-right: 110px !important; background: transparent !important;}
    #main-window[tabsontop="true"][sizemode="normal"] #toolbar-menubar {
    margin-left: 98px !important;margin-top: -30px !important; }
    #main-window[tabsontop="true"][sizemode="normal"] #appmenu-button-container {
    position: relative !important;z-index: 2 !important;}
    </nowiki></pre>

  • Displaying our own icon at the title bar of a frame.

    Hai,
    How do i display an Icon of my choice at the title bar of a frame or a dialog box.
    Thank you.

    Thank you shahidjava for the kind reply,
    I tried your code as follows but I'am getting an exception saying "wrong number of arguments in the method.".
    Can you please help this out.
    import java.awt.*;
    import java.awt.event.*;
    public class testIcon extends Frame
         public testIcon()
         setVisible(true);
         setTitle("mohammad afzal....!");
         setBounds(100,100,200,200);
         getIconImage("afzal.gif");
         public static void main(String args[])
         testIcon ti=new testIcon();
    }

  • 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();
    }

  • Changing color on the title bar

    How can I during runtime change the color of the title bar? I want to flash the title bar to warn, but I haven't found the function to set the color of it yet...
    Thanks in advance!
    Regards,
    Andreas

    since 1.4 you can use
    JFrame.setDefaultLookAndFeelDecorated( true );
    JDialog.setDefaultLookAndFeelDecorated( true );to get jframes and jdialogs looking like jinternalframes. but i don't know if it is now possible to change the color.
    tobias

  • 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

Maybe you are looking for

  • Application is not working when changing of oracle server domain name

    Hi friends We decided to change oracle server domain name due to some reason .. we changed the domain name but application running on the other server cannot connect to this domain i don't know whats the problem . I change the enterprise manager ( em

  • How can we update procedure in Database Directly

    Hi Experts how can we create a stored procedure in a database directly. for example I made a crystal report with a demo databse, then I want to run that report on production database. for that I have to create stored procedure manually. I want that W

  • How can I mirror my mac to my apple tv?

    how can I mirror my mac to my apple tv? I am running on mountin lion and I do not see the airplay icon on my tool bar. Someone help please.

  • Problem with two of my business rule triggers

    Good morning every one, I have a small problem with two of my business rule triggers. I have these tables: pms_activity csh_cash csh_integrate_leh csh_integrate_led and my process goes like this: upon approval of a row in my pms_activity table I have

  • Output Device ( convert PDF )

    Hello, I want to take a print out of a document/report in the system in PDF form without using abap code or FM. What kind of printer should I add or is it possible to add a normal printer to do this? Best Regards ismail Karayaka