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);

Similar Messages

  • ShowModalDialogue displays status bar when not told to

    Hi
    I am using the below code to display message box to the user
    var sOptions="dialogHeight:150px; dialogLeft:200px; dialogWidth:500px; help:no; scroll:no; status:no;";
    var intRet = theApplication().ShowModalDialog("MsgBox_orig.htm", arr, sOptions);
    Even after passing the value status as ‘no’, the status bar is displayed.
    Browser being used is IE Version : 6.0.2900.2180.xpsp_sp2_qfe.080814-1242
    Siebel Version : 8.0.0.3
    Please let me know how to fix this.

    i was getting the spinning grey wheel in status bar, with no files displaying.
    this thread describes re-launching Finder - which did the trick for me - though my issue was with the internal hard drive, not an external
    https://discussions.apple.com/thread/3649473?start=0&tstart=0

  • Page numbers in thumbnails & document display/status bar do not match

    I am using Acrobat Standard 6.0...documents that I have assembled using separate PDFs that I have scanned or printed to PDF. I am frequently deleting/inserting/replacing pages in the documents. I find that when I select a certain page in the page thumbnails (let's say, 60), and then go back to the document display, I am consistently sent to a different page. Usually it is about 4 pages back (i.e. page 56 in this example), but sometimes I am sent back to the first page. This didn't use to happen & I'm not sure why it started but it has been going on for months. It happens in all of the PDF files that I am using of this type. I just recently started using bookmarks and I seem to be having similar issues, in that some bookmarks that were linked to a certain place on a certain page are now taking me to a location 4 pages previous to the original target. I read the help and tried using Number Pages in the Options on the page thumbnails tab, but this didn't seem to do anything. Does anyone have a suggestion for me? Thanks.

    Hi,
    She is the only one affected and you don't have the problem with the same document, I doubt if her Office is updated? In earlier versions of Office there was this issue and we could easily solve it by keeping Office updated.
    Please learn from Update your computer:
    http://office.microsoft.com/en-001/word-help/update-your-computer-HA010354322.aspx
    Repairing Office from Control Panel is also suggested.
    We can also have the user start Word in Safe Mode to determine if this issue is 3rd-party add-ins related:
    Press Win + R and type “winword.exe /safe” in the blank box, then press Enter.
    If there is no trouble printing the document, disable the suspicious add-ins to verify which add-ins caused this issue.
    Regards,
    Melon Chen
    TechNet Community Support

  • Persistant Status Bar Notification ... error 'SP.UI.Status' is null or not an object

    I want to show a status bar that needs to be persistent on a page. for this I used the following in my master page
    function ShowStatusBarMessage(title, message)
    var statusId = SP.UI.Status.addStatus(title, message, true);
    SP.UI.Status.setStatusPriColor(statusId, 'yellow'); /* Set a status-color */
    HTML, call the JS method:
    <a onclick="ShowStatusBarMessage('Title'!','Awesome message!')">
    Display Status Bar message!
    </a>
    ref:
    http://www.zimmergren.net/archive/2010/03/17/sp-2010-dynamically-displaying-messages-to-your-users-with-the-notification-and-status-bar-areas-in-sharepoint-2010.aspx
    But what I want is
    to call the function on load. So I used pushed ny function to _spBodyOnLoadWrapper using _spBodyOnLoadFunctionNames.push("YourFunctionName");,
    it throws an error 'SP.UI.Status' is null or not an object
    Next I created and
    deployed a webcontrol and did a registerclientscript, that too gives me 'SP.UI.Status' is null or not an object
    // Define the name and type of the client scripts on the page.
    String csname1 = "AlertScript";
    Type cstype = this.GetType();
    // Get a ClientScriptManager reference from the Page class.
    ClientScriptManager cs = Page.ClientScript;
    // Check to see if the startup script is already registered.
    if (!cs.IsStartupScriptRegistered(cstype, csname1))
    StringBuilder cstext1 = new StringBuilder();
    cstext1.Append("<script type=text/javascript> alert('Hello World!');");
    cstext1.Append("var statusId = SP.UI.Status.addStatus('title', 'message', true);");
    cstext1.Append("SP.UI.Status.setStatusPriColor(statusId, 'yellow'); </");
    cstext1.Append("script>");
    cs.RegisterStartupScript(cstype, csname1, cstext1.ToString());
    What am I missing ?
    How can I get to show a status bar on load of any page, just as you get a health analyzer message when you get into the Central Admin?
    Thanks, Mano
    Mano Mangaldas | Blog : http://howtosharepoint.blogspot.com 

    Ok, for some reason, it is not working for me. Below are the code that didnt work for me
    <script type="text/javascript">
    function ShowStatusBarMessage(title, message)
    var statusId = SP.UI.Status.addStatus(title, message, true);
    SP.UI.Status.setStatusPriColor(statusId, 'red');
    ShowStatusBarMessage('Title!','Awesome message!');
    </script>
    This too didnt work
    <script type="text/javascript">
    function ShowStatusBarMessage()
    var statusId = SP.UI.Status.addStatus('Some title', 'Some message', true);
    SP.UI.Status.setStatusPriColor(statusId, 'red');
    _spBodyOnLoadFunctionNames.push("ShowStatusBarMessage");
    </script>
    I did try to register client script block programatically, that too didnt work
    String csname1 = "AlertScript";
    Type cstype = this.GetType();
    // Get a ClientScriptManager reference from the Page class.
    ClientScriptManager cs = Page.ClientScript;
    // Check to see if the startup script is already registered.
    if (!cs.IsStartupScriptRegistered(cstype, csname1))
    StringBuilder cstext1 = new StringBuilder();
    cstext1.Append("<script type=text/javascript>");
    cstext1.Append("var statusId = SP.UI.Status.addStatus('title', 'message', true);");
    cstext1.Append("SP.UI.Status.setStatusPriColor(statusId, 'yellow'); </");
    cstext1.Append("script>");
    cs.RegisterStartupScript(cstype, csname1, cstext1.ToString());
    Any help appreciated.
    But the below code works..
    <script type="text/javascript">
    function ShowStatusBarMessage(title, message)
    var statusId = SP.UI.Status.addStatus(title, message, true);
    SP.UI.Status.setStatusPriColor(statusId, 'yellow'); /* Set a status-color */
    </script>
    <a onclick="ShowStatusBarMessage('Title!','Awesome message!')" href="#">
    Display Status Bar message!
    </a>
    Thanks
    mano
    Mano Mangaldas | Blog : http://howtosharepoint.blogspot.com 

  • Status Bar Updates

    Is it possible for my C3PO to display status bar information somewhere in
    the Groupwise Client window? For example a text string like "Working
    Online", "Connecting", "Synchronizing", etc.
    The prefered location is the bottom of the screen.
    Thanks,
    Bentley

    Have you checked your network settings?
    * "3bar" menu > Preferences > Advanced > Network > Choose how Firefox accesses the internet

  • The status bar is pushed up at about 3/4 of the screen, so I can view onlu firefox at about 1/4, good thing there is a scroll bar, but below the status bar is white display? can u please help me, I want to drag down the status bar so I can have a full vi

    The status bar is pushed up at about 3/4 of the screen, so I can view only Firefox at about 1/4, good thing there is a scroll bar, but below the status bar is white display? can u please help me, I want to drag down the status bar so I can have a full view
    == This happened ==
    Every time Firefox opened

    Your code is absolutely unreadable - even if someone was willing to
    help, it's simply impossible. I do give you a few tips, though: If you
    understand your code (i.e. if it really is YOUR code), you should be
    able to realize that your minimum and maximum never get set (thus they
    are both 0) and your exam 3 is set with the wrong value. SEE where
    those should get set and figure out why they're not. Chances are you
    are doing something to them that makes one 'if' fail or you just
    erroneously assign a wrong variable!

  • Error message in a BADI getting displayed in a popup instead of status bar

    Hello All,
    I have implemented a BADI in ECC6 to prevent the change of formula in ERP from transaction O3I8.
    The BADI gets called on clicking 'Save' from transaction o3I8.
    Within the  BADI i am giving an error message using the following command:
    Message e000(ZABC) .
    However , the message gets displayed in a pop up instead of the status bar .
    The same is for information and warning messages.
    Any suggestions on how to display them in the status bar ?
    TIA
    Regards,
    Vartika

    Hi Brad,
    The checkbox to display messages in pop-up  is already switched off.
    Still themessages are getting displayed in pop-up.
    Regards,
    Vartika

  • 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. :-)

  • My blue task/status bar at the bottom of the page is no longer visible. How do I turn that back on? The status bar feature under view does display it.

    For some reason the blue status/task bar that would normally display at the bottom of the webpage (shows time, etc.) is no longer visible. I do not know how it got turned off and going to view-status bar simply enables a gray bar to display that says "done". I have searched using terms like "display task bar", etc and nothing comes up but view- status bar.
    == This happened ==
    Every time Firefox opened
    == May 5th

    That is the Windows Taskbar and not part of Firefox.
    The Firefox Status Bar shows messages like Looking up and Waiting for and loading and Done.
    If you do not see that Taskbar with Firefox closed then you may have hidden it.
    Try to move the mouse at the bottom and see if you can pull it up with the left mouse button pressed.
    If the Taskbar disappear if you open Firefox the check the Properties of the Taskbar to make sure that it is always visible.

  • Error Message Displaying the status Bar not like popup message

    Hi all,
    My Requirement is while creating  invoice if pricing conditons is repeted , system should thorough the error message like (uplicate Condition Types Are Not Possible  in the status Bar but Im getting poup Error message So I want to display the same message in the status Bar.
    Please Help me any one.
    Regards,
    Prathap

    I dont want to Display the popup, I want to Display in Status Bar as a Error Message.
    Like this .
    If I put  message type 'E' its Displaying popup message , MESSAGE ' Duplicate Condition Types Are Not Possible.' TYPE 'E'.
    If I Put messge type 'I' its Displaying in Status Bar .
    Regards,
    Prathap
    Edited by: giri prathap on Sep 13, 2011 12:35 PM

  • Display error message in the status bar during PBO

    Hi All,
    I want to issue an error message on a program's selection-screen.
    The thing is when I issue an error message inside PBO, all the text in the selection-screen are gone and replaced with lines.
    So i displayed the error message in the status bar.
                      MESSAGE S074(Z4) DISPLAY LIKE 'E'.
    But the problem with this is that it will allow to continue data processing.
    What shall I do in order for my error message to behave as an error message and not as a status message?

    Hi,
    Write your message in PAI same as you have done MESSAGE S074(Z4) DISPLAY LIKE 'E'.
    after this use call screen 'your screen no'.
    it will not lock the field.

  • How to control an error message to display at the status bar or in a popup?

    Hi experts,
    I find that one of the error message in an user exit display at the status bar in some conditions while
    display in a pop up window in other conditions. Is there some way to control its display style as I want
    it? Thanks in advance.

    Hi,
      Use the below code....
    CALL FUNCTION 'PTRM_UTIL_MESSAGE_APPEND
    EXPORTING
    i_msgtype = 'I' or 'W' <because you want message to display otherthan error>
    i_msgid = <Your message id which you are using in user exit>
    i_msgnumber = <Your messge number>
    Or
    If you want to display the text in a pop up window instead of the above process then use 'POPUP_TO_DISPLAY_TEXT' to display the message text in the popup.
    Rgds,
    Bujji

  • I had an addon that displayed RSS ticker in status bar. Now status bar is gone, how to I get an rss ticker?

    I had an addon that used the status bar to display information (RSS ticker). Now I upgraded firefox, status bar is gone and my addon doesn't work. I installed the status-4-ever addon that was recommended in one of the firefox pages but it doesn't work with the RSS addon. How do I get a scrolling RSS ticker in my window?

    Hello,
    Sometimes toolbars are missing because they are hidden, you just need to bring them back up. Visit this article to learn how to bring them back: [[Customize Firefox controls, buttons and toolbars]]. You can learn tips and tricks at the same time. Try putting it on your bookmarks toolbar if you are finding you are running out of space.
    You can also get an add-on to restore the Add-on bar:
    *Use the [https://addons.mozilla.org/en-US/firefox/addon/the-addon-bar/ Add-on Bar Restored] to bring back the add-on bar. Learn more here: [[What happened to the Add-on Bar?]]
    Did this fix your problems? Report back to us!
    Thank you.

  • How do I change the display order in the VPN menu in the status bar?

    Hello,
    How do I change the display order in the VPN menu in the status bar?
    (in the drop-down menu from this icon) ->
    Thanks.

    Hello. Perhaps this is because you are trying to arrange the order of many VPN services, since only one VPN service can be selected at once in System Preferences. In my original post, I did not mean that; I meant that I wanted to arrange the order of VPN configurations within a VPN service. In this screenshot, I have one VPN service only:
    And in the following one, it is shown that there are more than one VPN configurations within that VPN service:
    Furthermore, it was the order of VPN configurations that I wanted to change, not the order of VPN services. If you are trying to change the order of VPN services, I do not have a solution.

  • FM to display warning message at status bar

    Hi,
    can any body give me the FM to display the warning message
    at status bar.
    Thanks in advance

    Hi,
    To give a warning message , you dont need any function module. You can use the keyword 'MESSAGE' and give the type as 'W'.
    Do a F1 on the keyword MESSAGE for further details.
    regards,
    Advait

Maybe you are looking for

  • External Hard Drive is not showing up...

    Need Help...... I have Passport WD external hard drive which is not showing up in my computer. 

  • How can I see in EP7.0 a system message placed in ECC 6.0 ?

    Hi everybody. I have one question. We have an EP 7.0 and one ECC 6.0 .  In older versions 4.7 there is an IAC called sysmsg that you can use to show the system message you have placed in the ERP server through an iview in the portal. IT´s really usef

  • Compatibility w/ Older Universal Dock?

    I've got the original universal dock. (The one w/ S-Video and the big round IR sensor.) It's not sold anymore (for about 9-10 months maybe) and was made prior to the 3GS. Sometimes when I connect my phone I get a message that says the accessory is in

  • How to make sharp inner beveled corners?

    I am wonder if it is possible, when using the bevel and emboss tool in the layer style menu, to make a sharp inner corner? I was working on creating a frame using hard chisel bevel - it makes the outside of the frame have a sharp corner, but the insi

  • Is possible to save a form using Acrobat Reader? How to?

    Hi all, I designed a static pdf form using Livecycle. I want to send it to the form recipients, and I need they return me the pdf form filled. I can do this without problems on Adobe Acrobat Pro, but my mates that are using Adobe Reader can't save th