Status Bar using JFrame

Hi All,
I have a window which displays a map. This is done using JFrame. Now, I need to display the status bar at the bottom of the window using JFrame. How do i do it?
Please let me know asap.
Regards
Abhi

Read the Swing tutorial on "Using Layout Managers".
http://java.sun.com/docs/books/tutorial/uiswing/TOC.html
You add your "map" panel to the center and your "status" panel to the south.
In the future, Swing related questions should be posted in the Swing forum.

Similar Messages

  • Tracing of message in Status Bar using Call Transaction for MRBR

    Hi
    As per the business requirement, I would like to automate the MRBR Transaction. I am achieving this by using Call Transaction. After aaplying certain company codes as an i/p; i receive the invoices as an o/p in a ALV Lay out. Say for example, 100 invoices are displayed in a AlV Lay-out after applying i/p. Now I select all these 100 invoices and release them.
    All these steps are recorded and supplied to Call Transaction via BDC table.
    Problem:
    The number of invoices released, appear in the status bar of that ALV Lay-out screen. This message appears on the ALV screen after I have released the invoices and clicked on "SAVE" button.I would like to use this information and display this number (No. of Invoices released) in my Job Log. But I do not know how to do it. Could any one help me out for this?
    Thanks in advance,
    Jigar Shah.

    Yes I have tried that option as well.
    But the thing is, the recording gets over as soon as I click on "SAVE" button.And that message apperas in status bar only after I click on "SAVE" button.So this way the message in the status bar never gets recorded.
    Thanks & Regards,
    Jigar Shah.

  • Used View menu to hide Status Bar...how get Status Bar back?

    Used View menu to hide Status Bar...how do I get the Status Bar back?

    to get back your status bar use this extension
    http://techdows.com/2010/10/bring-back-status-bar-functionality-to-add-on-bar-in-firefox-4-with-status-4-evar-extension.html
    hope this will help
    thank you..

  • 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

  • How can I hide the java script status bar?

    I'm trying to hide the status bar using the feature in the advanced section of enable java script. I did a search in the help window of Firefox 5.0 and it shows the area in options to do this. I followed the instructions but the feature in my advanced area does not offer this selection. I'm trying to accomplish this in order to follow the recommendations of Pogo to enhance game playing experience.

    Hi. To remove the horizontal scrollbar you can do this:
    textArea.setWrapText(true);
    To remove the vertical scrollbar you can do this:
    ScrollBar scrollBarv = (ScrollBar)ta.lookup(".scroll-bar:vertical");
    scrollBarv.setDisable(true);  and set the opacity to 0 in the css file:
    //css file
    .text-area .scroll-bar:vertical:disabled {
        -fx-opacity: 0;
    }Here is an example:
    import javafx.application.Application;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.scene.Node;
    import javafx.scene.Scene;
    import javafx.scene.control.Button;
    import javafx.scene.control.ContextMenu;
    import javafx.scene.control.MenuItem;
    import javafx.scene.control.ScrollBar;
    import javafx.scene.control.TextArea;
    import javafx.scene.input.ContextMenuEvent;
    import javafx.scene.layout.StackPane;
    import javafx.stage.Stage;
    public class TextAreaSample extends Application {
        @Override
        public void start(Stage primaryStage) {
        final TextArea textArea = new TextArea();
            textArea.setWrapText(true);
            StackPane root = new StackPane();
            root.getChildren().add(textArea);
            Scene scene = new Scene(root, 300, 250);
            primaryStage.setScene(scene);
            primaryStage.show();
            scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
            ScrollBar scrollBarv = (ScrollBar)textArea.lookup(".scroll-bar:vertical");
            scrollBarv.setDisable(true);
        public static void main(String[] args) {
            launch(args);
    }

  • Display a message in status bar when error in a block based procedure

    Hi
    I have a block based on procedures.
    If I have an exception when I try to insert a record for example, how can I display a user friendly message in the status bar ?
    here is my insert procedure :
    PROCEDURE emp_insert2(t IN emptab) IS
      BEGIN
        FOR i IN t.first..t.last LOOP
        INSERT INTO emp (empno, ename, job, hiredate, sal)
        VALUES(t(i).empno, t(i).ename, t(i).job, t(i).hiredate, t(i).sal);
        END LOOP ;
      EXCEPTION
        When DUP_VAL_ON_INDEX then
            Raise_Application_Error( -20002, '^This identifier already exists^' ) ;
      END emp_insert2;When I use the ON-FORM trigger and ERROR_CODE and ERROR_TEXT variables, I get an FRM-XXXX message saying :
    40735--INSERT-PROCEDURE trigger raised unhandled exception ORA-00001.
    I want a message like :
    ORA-20002 This identifier already exists

    Hello,
    ORA-20500: ^This identifier already exists^ ORA-06512: à "SCOTT2.EMP_PKG", ligne 48
    I cannot figure out what is the problem described by the second part of the message.
    why numeric or value error in this case ? ( ligne 48 corresponds to the raise_applicaion_error instruction )There is no problem with the second part it is just for showing the line number it not the numeric or value error the code for numeric or value error is ORA-06502. See the below link for more information
    http://www.techonthenet.com/oracle/errors/ora06512.php
    So, now you can display your customized message in status bar using the error code which you defined in RAISE_APPLICATION_ERROR like below...
    DECLARE
         errcode VARCHAR2(50) := DBMS_ERROR_CODE;
         errtxt VARCHAR2(1000) := DBMS_ERROR_TEXT;
    BEGIN
         IF vErrCode='-20500' THEN
            MESSAGE('Here display your customized message.');
         ELSE
            -- Handle the rest errors...
         END IF;
    END; -Ammad

  • Displaying a status bar through swings

    Hi everybody,
    My problem is that i want to display a status bar, using Java Swings. In this regard i am facing somwe difficulty, and i would be really thankful to those, who in some way can help me.
    thanks

    Create a Static JLabel in the main application constructor and add it to the South position of your main window.
    Now set the text dynamically whereever u want to show a status message to this static label.
    I hope this can solve your problem

  • Displaying Status Bar

    Hi,
    I am having an application which consists of JFrames on which JInternal Frames are added through JDeskTopPanes. I am facing two problems :
    1. When I iconify the JInternalFrames, I am unable to see the incons in the bottom of the JFrame.
    2. How can I construct a status bar to JFrame with provision to display messages?
    Thanks in anticipation of reply
    Srini

    Here is some example code that shows internal frames inside a JFrame. There is a status bar at the bottom of the JFrame. If you run this code, you will see the status bar being updated whenever you move or resize one of the JInternalFrames. Hope this helps...
    cheers,
    dave
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.border.*;
    public class IntFrameTest extends JFrame
         private StatusBar sbar = new StatusBar();
         private JDesktopPane desktop = new JDesktopPane();
         public IntFrameTest()
              desktop.setPreferredSize(new Dimension(500, 400));
              desktop.setDesktopManager(new MyDtopManager());
              // Create Internal frames
              for (int i = 0, j = 0; i < 50; i += 10, j++)
                   JInternalFrame iframe = new JInternalFrame("Int Frame# " + j,
                        true, true, true, true);
                   iframe.setBounds(i, i, 250, 100);
                   iframe.setVisible(true); //necessary as of 1.3
                   desktop.add(iframe);
                   try
                        iframe.setSelected(true);
                   } catch (java.beans.PropertyVetoException e) { }
              getContentPane().setLayout(new BorderLayout());
              getContentPane().add(desktop, BorderLayout.CENTER);
              getContentPane().add(sbar, BorderLayout.SOUTH);
              pack();
         public static void main(String[] args)
              IntFrameTest jt = new IntFrameTest();
              jt.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
              jt.addWindowListener(new WindowAdapter()
                   public void windowClosing(WindowEvent event)
                        System.exit(0);
              jt.setVisible(true);
         class MyDtopManager extends DefaultDesktopManager
              public void dragFrame(JComponent frame, int newX, int newY)
                   super.dragFrame(frame, newX, newY);
                   sbar.setStatus1(((JInternalFrame)frame).getTitle() + " - Moving");
                   sbar.setStatus2(String.valueOf(newX)+","+String.valueOf(newY));
              public void resizeFrame(JComponent frame, int newX, int newY, int newWidth, int newHeight)
                   super.resizeFrame(frame, newX, newY, newWidth, newHeight);
                   sbar.setStatus1(((JInternalFrame)frame).getTitle() + " - Resizing");
                   sbar.setStatus2(String.valueOf(newX)+","+String.valueOf(newY)+","+
                        String.valueOf(newWidth)+","+String.valueOf(newHeight));
              public void endDraggingFrame(JComponent frame)
                   super.endDraggingFrame(frame);
                   sbar.setStatus1(null);
                   sbar.setStatus2(null);
              public void endResizingFrame(JComponent frame)
                   super.endResizingFrame(frame);
                   sbar.setStatus1(null);
                   sbar.setStatus2(null);
    class StatusBar extends JPanel
         private final JLabel status1;
         private final JLabel status2;
         public StatusBar()
              status1 = new JLabel(" "); // Need the space to get correct size!
              status2 = new JLabel(" ");
              status1.setBorder(new SoftBevelBorder(BevelBorder.LOWERED));
              status1.setHorizontalAlignment(JLabel.LEFT);
              status2.setBorder(new SoftBevelBorder(BevelBorder.LOWERED));
              Dimension size = new Dimension(125, status2.getPreferredSize().height);
              status2.setMinimumSize(size);
              status2.setMaximumSize(size);
              status2.setPreferredSize(size);
              status2.setHorizontalAlignment(JLabel.LEFT);
              GridBagLayout gbl = new GridBagLayout();
              GridBagConstraints gbc = new GridBagConstraints();
              setLayout(gbl);
              gbc.insets    = new Insets(2, 0, 0, 4);
              gbc.fill      = GridBagConstraints.HORIZONTAL;
              gbc.anchor    = GridBagConstraints.WEST;
              gbc.gridwidth = 1;
              gbc.weightx   = 1.0;
              gbl.setConstraints(status1, gbc);
              add(status1);
              gbc.insets    = new Insets(2, 0, 0, 0);
              gbc.fill      = GridBagConstraints.NONE;
              gbc.anchor    = GridBagConstraints.WEST;
              gbc.gridwidth = GridBagConstraints.REMAINDER;
              gbc.weightx   = 0.0;
              gbl.setConstraints(status2, gbc);
              add(status2);
         public void setStatus1(String text)
              status1.setText((text == null || text.length() < 1) ? " " : text);
         public void setStatus2(String text)
              status2.setText((text == null || text.length() < 1) ? " " : text);

  • Status Bar message

    Hi All,
    I have web Dynpro iviews in portal which are arranged in Worksets and roles. When we click on any role or workset, it is observed that the status bar message is changed accordingly. A long message starts displaying in the status bar  due to Loading of the requests and directing to the pages and iViews . I have a requirement where either the status bar can be made to display only some fixed message or Status bar do not display any message at all. This needs to be done in whole portal. Please advice.
    Thanks & Regards
    Harsimran

    Hi,
    For disabling the Status bar, just add the below line of code in Masthead (between JS code)(com.sap.portal.navigation.masthead) & redeploy.
    window.document.statusbar.enable = false;
    For setting default value in status bar, use:
    window.status="Welcome";
    and remove all occurances of mouseover.
    Regards,
    Santhosh

  • How can I use the same thread to display time in both JPanel & status bar

    Hi everyone!
    I'd like to ask for some assistance regarding the use of threads. I currently have an application that displays the current time, date & day on three separate JLabels on a JPanel by means of a thread class that I created and it's working fine.
    I wonder how would I be able to use the same thread in displaying the current time, date & day in the status bar of my JFrame. I'd like to be able to display the date & time in the JPanel and JFrame synchronously. I am developing my application in Netbeans 4.1 so I was able to add a status bar in just a few clicks and codes.
    I hope somebody would be able to help me on this one. A simple sample code would be greatly appreciated.
    Thanks in advance!

    As you're using Swing, using threads directly just for this kind of purpose would be silly. You might as well use javax.swing.Timer, which has done a lot of the work for you already.
    You would do it something like this...
        ActionListener timerUpdater = new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
                // DateFormat would be better, but this is an example.
                String timeString = new Date().toString();
                statusBar.setText(timeString);
                someOtherLabel.setText(timeString);
        new Timer(1000, timerUpdater).start();That code will update the time once a second. If you aren't going to display seconds, you might as well increase the delay.
    The advantage of using a timer over using an explicit thread, is that multiple Swing timers will share a single thread. This way you don't blow out your thread count. :-)

  • Trapping KeyEvents anywhere in a JFrame for a status bar

    Hi all,
    There are a few examples of how to implement a status bar in the archives, but I haven't seen anything that tells you how to trap KeyEvents (e.g. pertaining to CapsLock etc.) which occur anywhere in a JFrame: once you start adding focusable components (particularly but not exclusively JTextComponents) to a JFrame the JFrame itself is often not sent the KeyEvents, so a rudimentary addKeyListener() is not the answer.
    Could this involve the use of KeyboardFocusManager or sthg? NB to experts: I have read the tutorial on the focus subsystem to no avail. The key seems to be to trap the event thread in some way, perhaps??
    All help greatly appreciated...
    Mike

    Add a AWTEventListener on Toolkit.getDefaultToolkit() with appropriate mask. See javadocs of addAWTEventListener method.

  • HT201343 My MacBook Pro is a 15 inch Early 2011 Model i was using airplay for a while and now suddenlly i dont see it on my status bar?

    My MacBook Pro is a 15 inch Early 2011 Model i was using airplay for a long time and i could always turn it on from my status bar and now recently i cant seem to find it on my status bar and it says Apple TV is not connected

    Hi LoganXDasz,
    If you are having issues with AirPlay availability, you may find the following article helpful:
    Apple Support: Troubleshooting AirPlay and AirPlay Mirroring
    http://support.apple.com/kb/ts4215
    Cheers,
    - Brenden

  • Previous page had this: Common Questions What happened to the Status Bar? t you start with telling us What is the Add-on Bar? How do I use bookmarks? What are App Tabs? How do I customize the toolbars?

    Don't assume people automatically know all your technical terms! Before you talk about, e.g., "status bar", it would be really helpful to show or tell us WHERE IT IS.
    Since you made basic things like "history" and "bookmarks" harder to find, I'm back to using "CTRL H" for history -- is there a keystroke method to get to the bookmarks?

    See:
    * [[Glossary]]
    * [[Browsing basics]]
    * [[Tabbed browsing]]
    * [/kb/how-do-i-use-bookmarks]

  • How can I make the status bar hide automatically when using safari?

    How can I make the status bar hide automatically when using safari?

    When Safari is in FullScreen mode, menu bar will be hidden.
    Safari window to fit the screen?
    Move the mouse pointer to the bottom right corner of the Safari window.
    Double arrows will appear. Drag it to resize the window to fit the screen.

  • JFrames withous status bar with "Java Applet Window" ?

    Hello.
    I call a JFrame from JApplet. All my JFrames with a status bar where string "Java Applet Window" is showing. How can I creat JFrames without that status bar?
    Thank you in advance.

    This shows as a security measure because your applet isn't "signed". Your applet must be signed in order for this to not show.
    Refer to the following for a how-to:
    http://java.sun.com/developer/qow/archive/167/index.jsp

Maybe you are looking for