Updating JOptionPane message dynamically

I need to have a option pane where the message gets updated dynamically, something like "Time remaining n sec" where n decreases by 1 every sec. I am using JOptionPane.setMessage to do this, but sometimes (and it's easy to reproduce), the click on the "OK" button does not work, as if the mouse click event was completely missed. Here is the code, any idea why this could be happening? Any other suggestions?
import java.util.Timer;
import javax.swing.*;
import java.awt.*;
import java.util.*;
import java.awt.event.*;
public class OptionPaneTest
public void showDialog(JFrame parent)
JOptionPane pane = new JOptionPane();
JDialog dialog = pane.createDialog(parent , "some msg");
          TimerTask msgTask = new MessageUpdater(pane, 60);
          Timer msgTimer = new Timer(true);
          msgTimer.scheduleAtFixedRate(msgTask, new Date(), 1000);
dialog.show();
msgTask.cancel();
class MessageUpdater extends TimerTask
private int time;
JOptionPane pane = null;
private static final String msg = "Time left = " ;
public MessageUpdater(JOptionPane pane, int time)
this.pane = pane;
this.time = time;
public void run()
if(time >= 0)
SwingUtilities.invokeLater(new Runnable()
public void run()
pane.setMessage(msg + time);
time --;
public static void main(String[] args)
try
UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
catch (Exception e) { };
JFrame frame = new JFrame();
frame.setSize(300,400);
frame.setLocation(200,200);
frame.show();
OptionPaneTest opt = new OptionPaneTest();
opt.showDialog(frame);
Thanks!

Hello Raman,
out of ca. 40 trials I could reproduce the effect twice. Is such a ratio inacceptable for you? It is obviously not a coding problem. I met similar phenomenons with quite simple GUIs, particularly with 1.3, but much, much less with 1.4.
If you can spare the JOptionPane, you might try to display the seconds on a (temporarily) free part of your GUI. Not a great idea, I know; and of course, there's no guarantee.
Regards
Joerg

Similar Messages

  • [svn:osmf:] 10364: Latest updates to the Dynamic Streaming sample app , and a few bug fixes.

    Revision: 10364
    Author:   [email protected]
    Date:     2009-09-17 14:49:03 -0700 (Thu, 17 Sep 2009)
    Log Message:
    Latest updates to the Dynamic Streaming sample app , and a few bug fixes.
    Modified Paths:
        osmf/trunk/apps/samples/framework/DynamicStreamingSample/.project
        osmf/trunk/apps/samples/framework/DynamicStreamingSample/src/DynamicStreamingSample.mxml
        osmf/trunk/framework/MediaFramework/org/openvideoplayer/composition/ParallelSwitchableTra it.as
    Property Changed:
        osmf/trunk/libs/adobe/NetMocker/
        osmf/trunk/libs/adobe/StrobeUnit/

    Thanks 
    Now we can call and game at the same time
    Life is a train. You can choose your path choice, but you can not choose when the track will end...
    Where will the track take you?
    If my post has answered your question. Please mark it as an answer.

  • After last automatic update, error message XUL Runner error platform version '6.0.2' is not compatible with minVersion 6.0.1. maxVersion 6.0.1. I am unable to open Mozilla Firefox at all. Had to use Explorer to ask this question!

    After last automatic update, error message XUL Runner error platform version 6.0.2. is not compatible with min Version 6.0.1 maxVersion 6.0.1 appeared every time I try to open/run Mozilla Firefox.

    See:
    *[[/questions/869812]]
    *[[/questions/869951]]

  • Received notice of an update for one of my apps and when I tried to update the message reads "Account Not in this store"  i must switch to a Canadian store before purchasing

    Received notice of an update for one of my apps and when I tried to update the message reads "Account Not in this store"  i must switch to a Canadian store before purchasing.  I deleted app and tried to download again but still got the message.  Anyone know how to fix?  FYI have had phone for 2 years and this is the first time this has happened.

    The Apple id that you created do you remember if you created with your region sellected as Canada or US. If so you can change Region directly on your device by clicking on App Store icon, Scroll to bottom and tap your app is, click view acct and change region

  • How do I prevent the "update available" message while I'm watching a program?

    My 2011 Mac Mini is connected, via HDMI, to my 46" Samsung HD TV. I buy and rent 1080 movies and TV shows from iTunes. I also play a lot of other files that I've downloaded from other places. It's terrific except for one fly in the ointment...
    No matter what I'm watching, iTunes, NetFlix, VLC, Quicktime or straight off the desktop; if there is new software available, I get that annoying message that appears in the upper right hand corner. I can slide it to the right but it comes back a few minutes later. I could stop everything and perform the upgrade 10 to 30 minutes later but is this really the way video on a Mac is supposed to work? I feel there should be a way, at least, to pervent this from happening when I'm watching a program/movie/TV show. If it happens between, fine but why does it always have to pester me when I'm trying to enjoy watching T.V.?
    I know there is a way to turn it off, for the day, but come on- There's got to be a better solution than that. My U-Verse box very rarely bugs me about things. OSX and/or iTunes does it ALL the time. Can't it give me a break when I'm watching T.V.?
    Hopefully, I just missed some setting but I've tried a few things that didn't work.
    This is not a disaster but if someone knows a solution, I would be very grateful!
    Thanks!
    Teddy

    Mende1,
      Thanks for the super-fast response!
    I believe I tried this once before but the check box for "Automatically check for updates" always comes back, the next day. However, this might be my best solution for now and I'll test it watching the latest "Ripper Street", in iTunes, tonight. If it lasts the length of the program, I'll have to decide if I want to select "This solved my question" or "This helped me."
    I think I expected Apple to be a little more inTune with this. I absolutely love watching programs with my Mac Mini via HDMI. If they could find a consistent way to not interrupt programs, even with "Automatically check for updates" checked, the Mac video experience would be nearly perfect.
    I do make sure to perform updates but, between my wife's Mac and my two, plus the fact that updates seem to be occuring on a weekly basis, it's not easy to update immediately. I just feel that if a person is watching a movie or T.V. program, it's very clunky to have the "update available" message continuously appearing.
    Thanks again!
    Teddy

  • Problem in Displaying JOptionpane Message Dialog (JRE 1.5.0_04 or later)

    Hi! All,
    I am getting a deadlock kind a situation while displaying JOptionpane message dialog. It's very rare to simulate also. I am also posting the Thread dump which i have taken programmatically, when this situation arises.
    For your Information, I am using JRE 1.5.0_04 or later version on Windows XP.
    We searched on Java.sun.com site, & we got that two bugs are related to our problem, but there are arises in JRE 1.4.2 or before version & have been fixed at JRE 1.5 .
    Follwing are the bugs ID in Sun Bugs Database: 4978089, 4828019.
    Can anyone suggest me which is the stable JRE 1.5 version to avoid this problem. Also can anyone suggest me the workaround of this problem. I want to fix this in our application ASAP.
    following is My Thread Dump :
    Thread[Finalizer,8,system]
         java.lang.Object.wait(Native Method)
         java.lang.ref.ReferenceQueue.remove(Unknown Source)
         java.lang.ref.ReferenceQueue.remove(Unknown Source)
         java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)
    Thread[Java2D Disposer,10,javawsApplicationThreadGroup]
         java.lang.Object.wait(Native Method)
         java.lang.ref.ReferenceQueue.remove(Unknown Source)
         java.lang.ref.ReferenceQueue.remove(Unknown Source)
         sun.java2d.Disposer.run(Unknown Source)
         java.lang.Thread.run(Unknown Source)
    Thread[JCIL_Sess(813251)_EvtThd(24880015),5,main]
         java.lang.Object.wait(Native Method)
         java.lang.Object.wait(Unknown Source)
         java.awt.EventQueue.invokeAndWait(Unknown Source)
         javax.swing.SwingUtilities.invokeAndWait(Unknown Source)
         in.co.netsol.telecom.desktop.CallAppearanceTable$EventAdapter.OnCallEstablished(CallAppearanceTable.java:982)
         in.co.netsol.telecom.ctios.events.EventSinkAdapter.OnEvent(EventSinkAdapter.java:142)
         com.cisco.cti.ctios.cil.EventPublisher.PostEvent(EventPublisher.java:175)
         com.cisco.cti.ctios.cil.EventPublisher.FireEvent(EventPublisher.java:142)
         com.cisco.cti.ctios.cil.CtiOsSession.FireEvent(CtiOsSession.java:1849)
         com.cisco.cti.ctios.cil.Call.FireEvent(Call.java:254)
         com.cisco.cti.ctios.cil.Call.OnCallEstablishedEvent(Call.java:1136)
         com.cisco.cti.ctios.cil.Call.OnEvent(Call.java:943)
         com.cisco.cti.ctios.cil.CtiOsSession.OnEvent(CtiOsSession.java:2107)
         com.cisco.cti.ctios.cil.CilServiceEvent.ReceiverThread(CilServiceEvent.java:256)
         com.cisco.cti.ctios.cil.CilServiceEvent$1.run(CilServiceEvent.java:173)
    Thread[pool-1-thread-5,5,main]
         java.lang.Object.wait(Native Method)
         java.lang.Object.wait(Unknown Source)
         java.awt.EventQueue.invokeAndWait(Unknown Source)
         javax.swing.SwingUtilities.invokeAndWait(Unknown Source)
         in.co.netsol.telecom.desktop.command.MakeAgentReadyCommand$EventAdapter$1.run(MakeAgentReadyCommand.java:190)
         java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
         java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
         java.lang.Thread.run(Unknown Source)
    Thread[DestroyJavaVM,5,main]
    Thread[AWT-Shutdown,5,javawsApplicationThreadGroup]
         java.lang.Object.wait(Native Method)
         java.lang.Object.wait(Unknown Source)
         sun.awt.AWTAutoShutdown.run(Unknown Source)
         java.lang.Thread.run(Unknown Source)
    Thread[JCIL_Conn(18096534)_Watchdog,5,main]
         java.lang.Object.wait(Native Method)
         com.cisco.cti.ctios.util.UnNamedEvent.WaitForSingleObject(UnNamedEvent.java:147)
         com.cisco.cti.ctios.cil.CilConnection.WatchdogThread(CilConnection.java:527)
         com.cisco.cti.ctios.cil.CilConnection$1.run(CilConnection.java:1071)
    Thread[AWT-EventQueue-0,6,main]
         java.awt.Container.getComponents_NoClientCode(Unknown Source)
         java.awt.Container.getComponents(Unknown Source)
         javax.swing.JToolBar.getComponentAtIndex(Unknown Source)
         javax.swing.plaf.basic.BasicToolBarUI.navigateFocusedComp(Unknown Source)
         javax.swing.plaf.basic.BasicToolBarUI$Actions.actionPerformed(Unknown Source)
         javax.swing.SwingUtilities.notifyAction(Unknown Source)
         javax.swing.JComponent.processKeyBinding(Unknown Source)
         javax.swing.JComponent.processKeyBindings(Unknown Source)
         javax.swing.SwingUtilities.processKeyBindings(Unknown Source)
         javax.swing.UIManager$2.postProcessKeyEvent(Unknown Source)
         java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
         java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
         java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
         java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
         java.awt.Component.dispatchEventImpl(Unknown Source)
         java.awt.Container.dispatchEventImpl(Unknown Source)
         java.awt.Window.dispatchEventImpl(Unknown Source)
         java.awt.Component.dispatchEvent(Unknown Source)
         java.awt.EventQueue.dispatchEvent(Unknown Source)
         java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         java.awt.EventDispatchThread.run(Unknown Source)
    Thread[AWT-Windows,6,main]
         sun.awt.windows.WToolkit.eventLoop(Native Method)
         sun.awt.windows.WToolkit.run(Unknown Source)
         java.lang.Thread.run(Unknown Source)
    Thread[Timer-0,5,javawsApplicationThreadGroup]
         java.lang.Thread.dumpThreads(Native Method)
         java.lang.Thread.getAllStackTraces(Unknown Source)
         in.co.netsol.telecom.log.ThreadDumpLoggingTask.getStackTraces(ThreadDumpLoggingTask.java:47)
         in.co.netsol.telecom.log.ThreadDumpLoggingTask.run(ThreadDumpLoggingTask.java:36)
         java.util.TimerThread.mainLoop(Unknown Source)
         java.util.TimerThread.run(Unknown Source)
    Thread[JCIL_Conn(18096534)_Rcvr,5,main]
         java.net.SocketInputStream.socketRead0(Native Method)
         java.net.SocketInputStream.read(Unknown Source)
         com.cisco.cti.ctios.cil.NetPort.ReceiveData(NetPort.java:405)
         com.cisco.cti.ctios.cil.NetPort.ReceiveData(NetPort.java:363)
         com.cisco.cti.ctios.cil.CilPacket.ReadFromPort(CilPacket.java:649)
         com.cisco.cti.ctios.cil.CilConnection.ReadPacket(CilConnection.java:670)
         com.cisco.cti.ctios.cil.Connection.ReceiverThread(Connection.java:398)
         com.cisco.cti.ctios.cil.Connection$1.run(Connection.java:472)
    Thread[pool-1-thread-2,5,main]
         java.lang.Object.wait(Native Method)
         java.lang.Object.wait(Unknown Source)
         java.awt.EventQueue.invokeAndWait(Unknown Source)
         javax.swing.SwingUtilities.invokeAndWait(Unknown Source)
         in.co.netsol.telecom.desktop.command.SupervisorAssistCommand$EventAdapter$1.run(SupervisorAssistCommand.java:152)
         java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
         java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
         java.lang.Thread.run(Unknown Source)
    Thread[pool-1-thread-1,5,main]
         java.lang.Object.wait(Native Method)
         java.lang.Object.wait(Unknown Source)
         java.awt.EventQueue.invokeAndWait(Unknown Source)
         javax.swing.SwingUtilities.invokeAndWait(Unknown Source)
         in.co.netsol.telecom.desktop.command.ConferenceCallCommand$EventAdapter$1.run(ConferenceCallCommand.java:144)
         java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
         java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
         java.lang.Thread.run(Unknown Source)
    Thread[JCIL_Svc(5450181)_TxQThd(3083604),5,main]
         java.lang.Object.wait(Native Method)
         java.lang.Object.wait(Unknown Source)
         com.cisco.cti.ctios.util.QueueThread.GetQItem(QueueThread.java:152)
         com.cisco.cti.ctios.util.QueueThread.run(QueueThread.java:259)
    Thread[pool-2-thread-1,5,main]
         java.lang.Object.wait(Native Method)
         java.lang.Object.wait(Unknown Source)
         java.awt.Dialog.show(Unknown Source)
         javax.swing.JOptionPane.showOptionDialog(Unknown Source)
         javax.swing.JOptionPane.showMessageDialog(Unknown Source)
         javax.swing.JOptionPane.showMessageDialog(Unknown Source)
         in.co.netsol.telecom.desktop.DesktopMainPanel$3.run(DesktopMainPanel.java:1871)
         java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
         java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
         java.lang.Thread.run(Unknown Source)
    Thread[Signal Dispatcher,9,system]
    Thread[Reference Handler,10,system]
         java.lang.Object.wait(Native Method)
         java.lang.Object.wait(Unknown Source)
         java.lang.ref.Reference$ReferenceHandler.run(Unknown Source)
    Thread[TimerQueue,5,javawsApplicationThreadGroup]
         java.lang.Object.wait(Native Method)
         javax.swing.TimerQueue.run(Unknown Source)
         java.lang.Thread.run(Unknown Source)
    Thread[pool-1-thread-4,5,main]
         java.lang.Object.wait(Native Method)
         java.lang.Object.wait(Unknown Source)
         java.awt.EventQueue.invokeAndWait(Unknown Source)
         javax.swing.SwingUtilities.invokeAndWait(Unknown Source)
         in.co.netsol.telecom.desktop.command.MakeAgentNotReadyCommand$EventAdapter$1.run(MakeAgentNotReadyCommand.java:146)
         java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
         java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
         java.lang.Thread.run(Unknown Source)
    Thread[pool-1-thread-6,5,main]
         java.lang.Object.wait(Native Method)
         java.lang.Object.wait(Unknown Source)
         java.awt.EventQueue.invokeAndWait(Unknown Source)
         javax.swing.SwingUtilities.invokeAndWait(Unknown Source)
         in.co.netsol.telecom.desktop.command.TransferCallCommand$EventAdapter$1.run(TransferCallCommand.java:136)
         java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
         java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
         java.lang.Thread.run(Unknown Source)
    Thread[traceMsgQueueThread,5,main]
         java.lang.Object.wait(Native Method)
         java.lang.Object.wait(Unknown Source)
         com.sun.deploy.util.Trace$TraceMsgQueueChecker.run(Unknown Source)
         java.lang.Thread.run(Unknown Source)
    Thread[pool-1-thread-3,5,main]
         java.lang.Object.wait(Native Method)
         java.lang.Object.wait(Unknown Source)
         java.awt.EventQueue.invokeAndWait(Unknown Source)
         javax.swing.SwingUtilities.invokeAndWait(Unknown Source)
         in.co.netsol.telecom.desktop.command.EmergencyCommand$EventAdapter$1.run(EmergencyCommand.java:146)
         java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
         java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
         java.lang.Thread.run(Unknown Source)
    Thanks & Regards,
    Pradeep Gupta

    Update to the latest version 1.5.0_06 available from:
    http://java.sun.com/j2se/1.5.0/download.jsp
    It is advisable to remove previous version(s) installations unless required otherwise for a specfic application.

  • UPDATE FAILED MESSAGE WHEN TRYING TO DOWNLOAD FROM CC DESKTOP APP.

    I keep getting an 'update failed' message everytime I try to download from my CC desktop.
    What could this be?

    Kc2232 I would recommend reviewing the installation log for the update to determine why it is failing to install. You can find details on how to locate and interpret your installation log files at Troubleshoot install issues with log files | CC - http://helpx.adobe.com/creative-cloud/kb/troubleshoot-install-logs-cc.html.  You are welcome to post any specific errors you discover to this discussion.

  • XI: How to update the Message Status (shown by transaction SXMB_MONI  )

    Hi
       My question might be stupid, but I need you help.
    I would like to know how can I update the message status what we see while using trasaction SXMB_MONI  . The Scenrio is, I have a Custom Interface program build on the Abap Proxy interface method called EXECUTE_ASYNCHRONOUS.
    If I am not wrong, transaction SXMB_MONI is on the XI system and also on the SAP Application system. ( But I am not sure in what way the same transaction differ in two systems )
    My issue is,  when I receive the xml data into a structure in abap proxy, I am doing some validation on the received message data. If I found some error in the data , then I need to update the Message status of the SXMB_MONI to  ERROR flag. How to implement this ?   I have not done one before. And I am not sure, if any exception like error message is raised, will it stop the proxy from processing further and update the Message Status and this can be viewed using SXMP_MONI in the SAP application system to be ERROR flag?
    Or is there a BAPI or function module to handle this ?
    Appreciate your help
    David

    Hi
    I am not sure If I had understood you reply. But Would need your help to have a bit more insight to your answer. I am not completely into XI , but I am from ABAP side.
    At the R/3 side , Abap Proxy object geneted has the INTERFACE and its associated  METHOD, in which I am building my own abap code to do any validation on incomming data. But If I want to Raise a Exception, I understand that this Expection has to be first defined .
    But do I have to define a new Z Expection class  or can I just add a exception in the Proxy -Interface-method.
    I have not understood this process.
    All I need to do is, if I find any incomming data error , during my validation at the R/3 side, I need to stop the METHOD processing ( by any means ) and Update the Message Status flag show in SXMB_MONI to Error . 
    What is the trigger  that i can implement in myown code that will update the Message status to Error , from R/3 perspective of using SXMB_MONI.
    Thanks
    David

  • How to add SYS ID to Alert message dynamically in BPM

    Hi,
        I am adding alert message dynamically in the BPM for ALM. When we get email alerts, we couldn't distinguish whether this alert is coming from DEV, QAS or PRD system. To resolve this issue I am thinking to add system ID to the alert message user knows from which systems message is coming from. I need to know is there any standard variable where we get system id from BPM so that I can add it to alert message. Otherwise let me know what the best approach is?.
    Your inputs are highly appreciated.
    Thanks,
    Venkat.

    Hello Venkat,
    Check out this Michals blog on using system variables...
    /people/michal.krawczyk2/blog/2005/09/09/xi-alerts--step-by-step
    Hope this will help.
    Nilesh

  • How do I update CAN messages being transmitted as a periodic waveform?

    I am using NI-CAN 1.5 to transmit CAN messages with a CAN Object using the "Transmit Periodic Waveform" communication type. The CAN card I am using is a dual port PXI-8461.
    I wish to update the waveform message(s) but am running into problems. I configure the CAN Object with a write buffer size of 2 and then start transmitting 2 messages with one message going out every 500ms. These 2 messages are correctly getting placed on the bus. To update the messages, I successfully stop the CAN Object and attempt to write new data into the write buffer. This is where I am running into problems. The ncWrite VI is failing with an error of 0xBFF62008 (Write Queue Overflow).
    Upon further
    inspection, I noticed that when I stopped the Object and there was only 1 of 2 messages pending, I could successfully write one time; however, the second write would fail with the same error. If 2 messages were pending, neither write would be successful. I need to be able to update both messages. I thought maybe I could use the ncWait VI to wait for the write queue to empty and then write in 2 new messages; however, this will not work since the ncWait VI never returns before a timeout occurs in "Transmit Periodic Waveform" communication type. Either 2 or 1 messages are always pending so it never sees that the card is ready for new data.
    I looked in the Programmer's Reference Manual, and this is the procedure recommended. (A bit different, but I tried it and came up with the same results.) The Reference Manual claims ncWrite replaces the oldest data in the queue on page 3-30, but on page 2-40 it says ncWrite returns an error when called on a full queue.
    Does anyone see anyt
    hing that I'm doing wrong or have an alternate way to accomplish what I want? Thanks for your help.

    The "Transmit Periodic Waveform" section (pg 3-30) of the NI-CAN Programmer's Reference states, "Use this configuration to transmit a fixed sequence of CAN data frames over and over, one CAN data frame every period."
    The words "fixed sequence" denote that it was not intended to change as the program runs. I appolgize if this was not clear. Any suggestions for improvement to the documentation can be emailed to [email protected]
    If those two data sets do not change at run-time, they could be merged together. For example, make the buffer the size of both data sets added together. Start by Writing the first element of set one, then the first element of set two, then the second element of set one, then the second element of set two, etc.
    Randy Solomonson
    Application Engineer
    National Instruments

  • I am trying to update Itunes - message is " Invalid signature - download removed'  any ideas

    I am trying to update Itunes - message received is " Invalid signature - download  removed"  Wassup doc ???

    Try the update again. I received the invalid signature message when I updated to 10.5.1, but re-trying sorted it out. I might have had to re-start my computer, I can't remember now.

  • What to do? Operating system update stalled - message installing software update less than a minute

    What to do? Operating system update stalled - message "installing software update less than a minute" but that has lasted hour

    Press and hold the power button for a few seconds until the power shuts off, then release, wait a few more seconds, and press it again briefly to restart.

  • Cant get rid of JOptionPane Message title

    Im trying to get some user input using a JOptionPane message. I am able to get the information that im looking for but when the window comes up there is a header that says "JOptionPane message" and I would like to get rid of this. Here is the code that I am using. Any help would be greatly appreciated
    JOptionPane addItem = new JOptionPane();
    Object[] o = {addAddress, addItemAddress, addDescription, addItemDescription, ok};
    addItem.setOptions(o);
    d = addItem.createDialog(null, "Add Item to Address Book");
    d.setVisible(true);

    Thanks for all of your help. I needed to specify what the Message was I wanted in the title.
    addItem.setMessage("Add Item");
    JOptionPane addItem = new JOptionPane();
    Object[] o = {addAddress, addItemAddress, addDescription, addItemDescription, ok};
    addItem.setOptions(o);
    d = addItem.createDialog(null, "Add Item to Address Book");
    d.setVisible(true);JOptionPane addItem = new JOptionPane();
    Object[] o = {addAddress, addItemAddress, addDescription, addItemDescription, ok};
    addItem.setOptions(o);
    addItem.setMessage("Add Item");
    d = addItem.createDialog(null, "Add Item to Address Book");
    d.setVisible(true);

  • I am trying to update to Itunes 10.5 and when i click update a message comes up cannot find url..

    I am trying to update to Itunes 10.5 and when i click update a message comes up cannot find url..any idea what this means

    Easyest way is to uninstal itunes manualy and then download new itunes from apple.com .

  • Call MESSAGE dynamically

    Hi all,
    How can I call a message dynamically?
    For e.g.: MESSAGE E011(00)
    Where
    00 --> Message ID (class) - get at runtime
    011 --> Message number -  get at runtime
    Thanks,
    Khanh
    Edited by: Khanh Nguyen on Mar 26, 2010 6:43 PM

    You always see this in the SY-SUBRC NE 0 statement of a function module but never thought about it
    DATA: v_id  TYPE sy-msgid VALUE 'Z_MSG',
          v_mtype TYPE sy-msgty VALUE 'I',
          v_num  TYPE sy-msgno VALUE '014'.
    MESSAGE ID v_id TYPE v_mtype NUMBER v_num.

Maybe you are looking for