Creating a status bar?

How could I create a status bar that looks like the one of Internet Explorer?
I thought about deactivated JToggleButton with pressed state, but the shadow of it is too strong.
Somehow I need to have the separators in the status bar to look like in Windows applications, for instance like used in Internet Explorer.

It is not an exact match.
The separators look slightly thicker and the shadows are softer in IE.
However this should help.
        JPanel statusbar = new JPanel();
        statusbar.setLayout(new BoxLayout(statusbar,BoxLayout.X_AXIS));
        statusbar.setPreferredSize(new Dimension(100,30));
        JPanel pan1 = new JPanel();
        pan1.setBorder(BorderFactory.createBevelBorder(1));       
        pan1.setPreferredSize(new Dimension(100,30));
        statusbar.add(pan1);
        JPanel pan2 = new JPanel();
        pan2.setBorder(BorderFactory.createBevelBorder(1));       
        pan2.setPreferredSize(new Dimension(30,30));
        statusbar.add(pan2);
        JPanel pan3 = new JPanel();
        pan3.setBorder(BorderFactory.createBevelBorder(1));       
        pan3.setPreferredSize(new Dimension(30,30));
        statusbar.add(pan3);
        JPanel pan4 = new JPanel();
        pan4.setBorder(BorderFactory.createBevelBorder(1));           
        statusbar.add(pan4);
        getContentPane().add(statusbar, BorderLayout.SOUTH);There is another BorderFactory.createBevelBorder( ... ) method that will allow you to change the color of the shadows.
If you want them thicker you'll probably have to use a custom border.
Derek

Similar Messages

  • How can I create a status bar at the bottom of a window ?

    I would like to create a status bar at the bottom of my main window similiar to "Internet explorer" has. I thought of using a tool bar but I can't see how to keep it positioned at the bottom of the window when the window is resizable. Any other ideas on how to do this the bar only needs to contain a small amout of text and maybe an icon or two.

    CVI doesn't have a status bar control on UI element like the one available in Visual Studio++. The best way to replicate this is most like through a string control that is resized and positioned to remain at the bottom of the window and colored to look appropriately. I have also seen the combination of a decoration and a text message used.
    Best Regards,
    Chris Matthews
    Measurement Studio Support Manager

  • Create a Status Bar

    How can I create a Status Bar?
    Thanks.

    I'm pretty sure this has been covered a couple of 1000 times... let me see.... ah yes, Dr. Google is your friend:
    http://www.google.com/search?lr=&ie=UTF-8&oe=UTF-8&q=java%20swing%20status%20bar

  • To create a status bar

    hai friends,
    how can we create a status bar in a window/frame/textbox.

    I got this answer. Any one have other choices..
    class MenuHelpTextAdapter implements ChangeListener
       private JMenuItem menuItem;
       private String helpText;
       private JLabel statusBar;
       public MenuHelpTextAdapter(JMenuItem menuItem, String helpText, JLabel statusBar)
          this.menuItem = menuItem;
          this.helpText = helpText;
          this.statusBar = statusBar;
          menuItem.addChangeListener(this);
       public void stateChanged(ChangeEvent evt)
          if (menuItem.isArmed())
             statusBar.setText(helpText);
          else
             statusBar.setText(" ");
    }The code that creates the adapters for the menu items is quite simple:
    new MenuHelpTextAdapter(item1, "Help text for item 1", statusBar);
       new MenuHelpTextAdapter(item2, "Item 2 info", statusBar);Using this adapter -- as an inner class in this case -- we can create a complete sample program:
    import java.awt.event.*;
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class StatusBarTest
       JLabel statusBar;
       JMenuItem item1;
       JMenuItem item2;
       private void init()
          JFrame frame = new JFrame("Status Bar Test");
          JMenuBar menuBar = new JMenuBar();
          frame.setJMenuBar(menuBar);
          JMenu fileMenu = new JMenu("File");
          menuBar.add(fileMenu);
          item1 = new JMenuItem("Item 1");
          item2 = new JMenuItem("Item 2");
          fileMenu.add(item1);
          fileMenu.add(item2);
          Container contentPane = frame.getContentPane();
          contentPane.setLayout(new BorderLayout());
          contentPane.add("Center", new JButton("Main application area"));
          statusBar = new JLabel(" ");
          contentPane.add("South", statusBar);
          new MenuHelpTextAdapter(item1, "Help text for item 1", statusBar);
          new MenuHelpTextAdapter(item2, "Item 2 info", statusBar);
          frame.setSize(400,400);
          frame.setVisible(true);
       public static void main(String[] args)
          StatusBarTest t = new StatusBarTest();
          t.init();
       class MenuHelpTextAdapter implements ChangeListener
          private JMenuItem menuItem;
          private String helpText;
          private JLabel statusBar;
           public MenuHelpTextAdapter(JMenuItem menuItem, String helpText,
           JLabel statusBar)
             this.menuItem = menuItem;
             this.helpText = helpText;
             this.statusBar = statusBar;
             menuItem.addChangeListener(this);
          public void stateChanged(ChangeEvent evt)
             if (menuItem.isArmed())
                statusBar.setText(helpText);
             else
                statusBar.setText(" ");
    }

  • Can't create a status bar for my window

    I'm trying to add a status bar to a window I've created. I've tried to get this to work by doing this:
    frame = new JFrame();
    canvas = new CanvasPane();
    frame.setContentPane(canvas);
    frame.setTitle(title);
    canvas.setPreferredSize(new Dimension(width, height));
    backgroundColour = bgColour;
    Container contentPane = frame.getContentPane();
    JLabel statusLabel = new JLabel("This is the status bar");
    contentPane.add(statusLabel, BorderLayout.SOUTH);
    Everything works except for the status bar. What am I doing wrong?

    in the above example, the poster is taking it for granted that you class extends the JFrame class. In case not then you have do as follows:
    myFrameName.getContentPane()."What ever else";Also before starting to put thing using the border layout do as follows:

  • How to create a status bar in Forms 6i

    Hi,
    I am using Forms6i. I am calling a C application which takes some time to execute...So I would like to display a status bar in forms saying....Processing..Please Wait...
    And, once the control comes back to forms from the C program, this status should say complete.....
    Is there a way to do this ?..
    Please give some example /link for this
    thanks

    Hi
    Y cant u have a text item, ENABLED before the that C code with DEFAULT value 'Pleae wait....' and even u could have cursor style also set to BUSY.. then after process DISABLE the text item and bring back cursor style to DEFAULT.
    Regards

  • Create status bar...... like explorer or word, excel

    is it possible to create a status bar like other application in which we can see the full path of file ane numlock on --off like that                                                                                                                                                                                                                                                                            

    hi,
    yes you can, just add a jpanel to the bottom (SOUTH if you're using BorderLayout) of your jframe, jdialog, whatever, and place whatever you want on it, such as a jlabel to display a file's full path.

  • Status bar or jlabel

    hi all,
    how can i create a status bar on my java app
    that shows a message if it is connected on the internet or not.
    i already have an application that checks for internet connection
    every 6seconds, and has a getter method that returns a
    message.
    also is this possible?
    JLabel.setText(CheckConnection.getMessage())
    where CheckConnection.getMessage() returns a String value.
    how can i make my JLabel act like it was refreshing when the string passed to it changed?
    so that my JLabel notifies my application that it is disconnected.
    thanks.

    Hi,
    Create a thread that calls checkConnection.getMessage(), and sets the message on the JLabel.
    Kaj

  • Should a Status Bar be in the Root Pane or Content Pane?

    Hello, I wonder if you can help...
    Should a status bar be built into a JFrame (much like a JMenuBar, by extending JFrame and JRootPane along with its layout manager)?
    I have created a status bar using the method above, but it seems to be more complex than it need be; so I am wondering whether to simply add it to a JFrames content pane.
    Advantages of extending JRootPane and building the status bar as part of a frame:
    1. It allows the frames content panes south region to remain unoccupied, and thus will not conflict with a JToolPanes positioning.
    Advantages of adding the status bar to the content pane south region:
    1. Keeps the design nice and simple, so no knowledge of the root pane need be known;
    2. We can use composition (rather that inheritance) to define the frame and its parts.
    All comments are welcome.

    Hi,
    ( I search for iChat questions when I have finished in the iChat Forum)
    So the menu bar reads iChat, File,  Edit,  View, Buddies, Video, Window and Help
    There is no Buddy List open.
    There is no other window for iChat open.
    In the iChat Menu you only have access to Status.
    Is an item ticked in the list ?
    Is this a green (Available item) or  Red ( an Away one) ?
    Can you access the Accounts option ?  (Sitll in the iChat Menu)
    Is anything in here ticked ?
    In the Window menu any Logged in account should appear in the list  (Between the Next Chat and File Transfer items)
    It would be useful to know which version of iChat this is.
    If no account is ticked (iChat Menu > Accounts) or not showing in the Window Menu, plus you cannot determine the Status and you cannot access the Preferences then you need to access your Home Folder/Library/Preferences
    As the Library in the Home Holder is Invisible in Lion you will need the Finder's Go Menu > Go to Folder option  (you can use it in earlier OS versions if you want)
    Type in:-
    ~/Library/Preferences
    Find the file called com.apple.ichat.plist
    Drag it to the Trash and Restart iChat.
    This will lose all the settings in iChat that you have changed from Defaults but there is no way around this.
    9:23 PM      Saturday; August 27, 2011
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb( 10.6.8)
     Mac OS X (10.6.8),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • Status bar & MDI Child

    Hi again,
    Now, I am interested in creating a status bar at the bottom of my vi and I want to put the date and time in it or other messages that my application generates. How can I do it?
    and.... How can I do and a MDI child application like in visual basic?
    Finally,
    Is it possible in time execution to show the front panel of my vi without embeding it in a window? LabVIEW always embeds the vi in a window, I would like to not embed it in a window.
    Thanks,
    ToNi.

    I'll start with the easy ones -
    The easy way to put a status bar in your app is probably to devote that area for one, or several, controls which will display what you want. You can decorate that area and customize the controls to have the look you want. If you want it to hover above, I think your best chance is a subVI constantly open in that area.
    Which brings me to the next question - "LV embeds the VI in a window" - I presume you mean the menu bar (the area where the run button and the VI icon are). If so, right click the icon, select VI Properties and go to Window Appearence. Here you customize these options.
    Last one - MDI. If I understand correctly, this is Multiple Document Interface, meaning that you have several child windows sharing the same menus, etc. Like when you open Word and have several documents in the same space or Photoshop and have several pictures in the same space using the same tools. I don't know how this works in VB (how does it work in VB, by the way?), but I don't think this can be done just as easily in LV, since LV is multiplatform and VB (I believe) is windows specific and uses windows options inherently to do this (just a guess, LV also has some windows specific features). Anyway, you can have a seperate VI as your common area and simulate this using subpanels (can be found in the Containers palette, next to the tab control) or using regular subVIs, but you'll probably have to sync all of them somehow. Hope this helps. Maybe I'm wrong and someone will have a better idea.
    Try to take over the world!

  • Status bar help?

    i'm trying to create my first java application. my question is, is there any class that i can use to create a status bar or how do i create one if theres none?

    It would be better to ask this question on one of the Java technology developer forums:
    http://forum.java.sun.com/index.jsp

  • How to create a progress bar showing status on timeout of TCP Read function

    Is there any way of creating a progress bar showing the status of a 'TCP Read timeout' time ... ?
    I'm sending a data request to an intranet server via TCP Write, and then using TCP Read with a 2 min. timeout to receive the requested data. During this time i want to show the actual progress of the timeout in a progress bar.
    Can this be done?
    And do i have to implement some kind of multitasking to make it happen?
    TIA

    Soulstorm wrote:
    > Is there any way of creating a progress bar showing the status of a
    > 'TCP Read timeout' time ... ?
    >
    > I'm sending a data request to an intranet server via TCP Write, and
    > then using TCP Read with a 2 min. timeout to receive the requested
    > data. During this time i want to show the actual progress of the
    > timeout in a progress bar.
    > Can this be done?
    > And do i have to implement some kind of multitasking to make it
    > happen?
    It can be done and you need to do some multitasking yes, but that is
    quite easy in LabVIEW. A separate loop or subVI with loop will be
    responsible for the progress bar. Set its scale to 0 and the number of
    seconds of your timeout. In parallel to the TCP Read let this loop or VI
    execute reading the time every few
    seconds and calculating the
    difference to its start time, passing this value to the progress bar
    slider. Have an extra boolean global which aborts the loop and set this
    boolean to FALSE before starting the loop/VI and TCP Read and setting it
    to TRUE on return of the TCP Read.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How to disable status bar from creating a dead zone in the simulator

    Is this a known bug in the simulator,where a hidden status bar is still grabbing touches? I constantly get frustrated by the inability to click at the top 20 or so pixels of the screen because that is a dead zone, and even though I have a hidden status bar the status bar is still grabbing touches there. Any way around this? And will this happen in the iPhone version, or is it just the simulator?

    You have a point, if your users are filling the form in with Reader, they won't be able to save the data with the form unless the form has been "Reader Extended" (which enables this functionality in Reader for the particular form)
    If you have Acrobat Pro, you can "extend" the form before you send it to the users.  The following is from the Acrobat Pro help...
    Enable Reader users to save form data
    Ordinarily, Reader users can’t save filled-in copies of forms that they complete. However, you can extend rights to Reader users so they have the ability to do so. These extended rights also include the ability to add comments, use the Typewriter tool, and digitally sign the PDF.
       1. Open a single PDF, or select one or more PDFs in a PDF Portfolio.
       2. Choose Advanced > Extend Features In Adobe Reader.
    These extended privileges are limited to the current PDF. When you create a different PDF form, you must perform this task again if you want to enable Reader users to save their own filled-in copies of that PDF.
    Regards
    Steve

  • How create a tooltips in status bar icons

    the answer is in the title
    I want to create a tooltips on my application icon tray, in the status bar icon.
    I think that the solution is in the SDK, but i dont know to implement this code:
    source MSDN:
    #define ARRAYSIZE(a) (sizeof(a)/sizeof(a[0]))
    NOTIFYICONDATA IconData = {0};
    IconData.cbSize = sizeof(IconData);
    IconData.hWnd = hwndNI;
    IconData.uFlags = NIF_INFO;
    HRESULT hr = StringCchCopy(IconData.szInfo, ARRAYSIZE(IconData.szInfo), TEXT("Your message text goes here."));
    if(FAILED(hr))
    // TODO: Write an error handler in case the call to StringCchCopy fails.
    IconData.uTimeout = 15000; // in milliseconds
    Shell_NotifyIcon(NIM_MODIFY, &IconData);

    If you're interested in the icons in the notification area, I think the easiest solution is to use the "System Tray Icons" functions in toolbox.fp.
    You can create a new icon calling InstallSysTrayIcon(), and you can also set the tooltip text.
    Vix
    In claris non fit interpretatio
    Using LV 2013 SP1 on Win 7 64bit
    Using LV 8.2.1 on WinXP SP3
    Using CVI 2012 SP1 on Win 7 64bit, WinXP and WinXP Embedded
    Using CVI 6.0 on Win2k, WinXP and WinXP Embedded

  • How do I enable some scripts to run in some programs/websites and what happened to the status bar of my Mozilla Firefox 4?

    Well, first of all, I was tying to create a web-based computer game in Notepad in H.T.M.L., C++, and JavaScript codes. But when I tried to open the completed product, Firefox only came up with a blank page. What do I do with this? And also, I unwittingly removed the "Status Bar" on the bottom side of my browser(the one that always says "Transferring data from/to..."), and when I tried to bring it back up, I couldn't because I don't know how, since I'm new to Mozilla Firefox 4. If you could help me with these problems, Then I would greatly appreciate it.

    You can install the Status-4-Evar extension to regain some functionality from previous Firefox versions that was lost with the removal of the Status bar.
    Open the Customize window via "View > Toolbars > Customize" or via "Firefox > Options > Toolbar Layout" after you have installed the Status-4-Evar extension and drag the items (Status Text, Progress Meter, Download Status) upon the Add-ons Bar (View > Toolbars > [X] Add-on Bar)<br />
    Also check the Options of Status-4-Evar in Firefox (or Tools) > Add-ons
    * Status-4-Evar: https://addons.mozilla.org/firefox/addon/235283/

Maybe you are looking for

  • What is the best anti-fingerprint screen protector?

    SGP havn't release the UO version yet, any other suggestion for the new retina screen.

  • Message Center Plus -error Event ID: 4

    Hi, here is the log from event viwer -any idea how to fix it? Log Name:      Lenovo-Message Center Plus/Admin Source:        Lenovo-Message Center Plus/Admin Date:          19-Jan-11 7:20:08 PM Event ID:      4 Task Category: (4) Level:         Error

  • Help! My Illustrator is killing me!

    Several opererations in Illustrator CS5 are painfully slow including saving, printing, and switching to Photoshop after copying. Here's my sitch: Windows XP Professional SP3 Desktop PC, Intel Core2 Quad CPU @ 2.33 GHz 3GB RAM Lots of empty storage on

  • Synaptic + Clickpad / One big touch pad with buttons

    I just got a new Thinkpad E420s! The touchpad is just one big touch pad. There are no seperate buttons for the touchpad. However, there are buttons bulit-into the touchpad at the bottom. How can I figure synaptic to support this kind of touchpad. Whe

  • Second screen blacked out when full screen with dual displays

    I have a MacBook Pro connected to an LCD display. I use both screens. When working from home I'd like to have my local machine showing on the LCD monitor and my work machine showing in the MBP screen. I can do this, however I can't have the work mach