Customized KeyboardFocusManager problems with JOptionPane-Dialogs

Hi,
I have a problem I'm not able to solve: With Java 1.4.2 unter Linux, as well as all newer Java Versions (1.4, 1.5, 1.6) under Windows, dialogs created by JOptionPane.showXXXDialog do not react to keyboard events like <Tab> any more when using a customized KeyboardFocusManager. Java 1.5 and 1.6 under Linux work fine.
Here is what I did:
I have a JFrame and want some customized focus control when navigating through the Frame with <Tab>. Therefore I've implemented a class
public class EfaFrameFocusManager extends DefaultKeyboardFocusManagereand said in the main JFrame:
EfaFrameFocusManager myFocusManager = new EfaFrameFocusManager(this,FocusManager.getCurrentKeyboardFocusManager());
FocusManager.setCurrentKeyboardFocusManager(myFocusManager);The constructor of my EfaFrameFocusManager stores the JFrame (this) and the original KeyboardFocusManager (2nd arg) for later use. Within my own FocusManager, I've implemented the method
public void processKeyEvent(Component cur, KeyEvent e)which is checking whether the desired Frame (efaFrame) is currently active or not. If it is active, it's performing my customized operations which is working well. If it is not active (e.g. because a dialog created with JOptionPane.showConfirmDialog() is open), it should perform default actions. So I said within processKeyEvent:
if (!efaFrame.isActive()) { // efaFrame is the previous "this" arg
  fm.processKeyEvent(cur,e); // fm is the previously stored CurrentKeyboardFocusManager
  return;
}Instead of invoking processKeyEvent on the original KeyboardFocusManager fm, I also tried super.processKeyEvent(cur,e);, but without any change in behavior.
As I said before, this is working well under Java 1.5 and 1.6 with Linux.
However, it is not working unter Windows (any Java version I tried, including 1.4, 1.5 and 1.6) and also not unter Linux with Java 1.4. With these combinations, dialogs created by JOptionPane.showXXXDialog(...) do not respond to the <Tab> key. I do see that my own FocusManagers processKeyEvent method is invoked, and I also see that it invokes the one of the original FocusManager, but the Dialog doesn't react.
What am I doing wrong?
Nick.

I have a JFrame and want some customized focus control when navigating
through the Frame with <Tab>. sounds like you should be doing this via a FocusTraversalPolicy
http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html#customFocusTraversal

Similar Messages

  • Strange problem with JOptionPane.showInputDialog

    I have a strange problem with JOptionPane.showInputDialog in that when I run a program anything that is typed in is displayed backwards, for example: I type this character > and this < is what is displayed.
    I've uninstalled the sdk and reinstalled it twice but that hasn't solved my problem and the java plug-in in the control panel is displaying the same symptoms.
    I did a search before posting this but all I got really was posts from people who wanted to reverse their text.
    Thanks for your help on this.

    Is it just the < and > characters?

  • Problems with Print dialog

    Hello!
    I have two problems with a print dialog. First, I can not set the default page size to A4. Secondly, the program, or at least GUI, hangs, after the dialog is closed. It did not happen in Java 1.4, but it does in Java 1.5. Using the debugger in Netbeans to pause the hung program shows no thread position, and the stack trace window is empty too.
    Here is the code of the method that opend the print dialog and then prints the image. The setEnabled() method disactivates the main window while the dialog is shown.
    * Prints the tactile image. If the printing fails, shows an
    * error message.
    void printTactileImage() throws ImageException, InterruptedException,
         InvocationTargetException {
         DocumentPrint documentPrint = new DocumentPrint(document);
         final PrinterJob printerJob = PrinterJob.getPrinterJob();
         printerJob.setPrintable(documentPrint);
         final HashPrintRequestAttributeSet attributes =
              new HashPrintRequestAttributeSet();
         attributes.add(MediaName.ISO_A4_WHITE);
         final boolean[] print = new boolean[1];
         javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
              public void run() {
                   setEnabled(false);
                   print[0] = printerJob.printDialog(attributes);
         if(print[0]) {
              showStatus(tlte( "printing_dots" ));
              try {
                   printerJob.print(attributes);
              } catch(PrinterException e) {
                   final JFrame thisFrame = this;
                   final String titleString = tlte("shared_error");
                   final String messageString =
                        tlte("shared_could_not_print_document") +
                        e.toString() +
                   javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
                        public void run() {
                             JOptionPane.showMessageDialog(thisFrame,
                                  messageString,
                                  titleString,
                                  JOptionPane.ERROR_MESSAGE);
         javax.swing.SwingUtilities.invokeLater(new Runnable() {
              public void run() {
                   setEnabled(true);
    }Thanks!
    Artur

    An additional info about the error dialog: the `OK' button in the dialog did not work, yet the animation in the main window was running at the same time.
    The program was also a bit different when I ran it in Java 1.4 - the print method was probably the same though.
    I have just disabled the animation to check if it causes the problem, but the print dialog and the error dialog were still not responding after opening.
    The method for opening files:
    * Opens a document. Should not be called from the event dispatch
    * thread. If the opening fails, an error message dialog is shown.
    * @param fileName                         file name of the opened document
    void openDocument(String fileName) throws InterruptedException,
         InvocationTargetException {
         final boolean firstDocument = document == null;
         try {
              javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
                   public void run() {
                        setEnabled(false);
              File file = new File(fileName);
              String name = file.getName();
              document = new Document(name, fileName,
                   edgeThreshold, textureScale,
                   variableTextureDensity,
                   textureMappingOptions,
                   this);
                   javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
                   public void run() {
                        documentView.setDocument(document);
                        documentView.setViewMode(viewMode);
              document.setPrintImageType(tactileImageType);
              setTitle(WINDOW_TITLE_PREFIX + " - " + name);
              javax.swing.SwingUtilities.invokeLater(new Runnable() {
                   public void run() {
                        if(firstDocument)
                             setEnabledDocumentOperationComponents(true);
                        setEnabled(true);
         } catch(DocumentException e) {
              final JFrame thisFrame = this;
              Object[] messageArguments = {
                   new String(fileName)
              final String messageString =
                   new MessageFormat(tlte( "shared_could_not_open_file" ), getLocale()).
                        format(messageArguments) +
                   ":\n" + e.toString() + ".";
              javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
                   public void run() {
                        JOptionPane.showMessageDialog(thisFrame,
                             messageString,
                             tlte("shared_error"),
                             JOptionPane.ERROR_MESSAGE);
              setEnabled(true);
    }

  • Secure printing problems with the dialog box

    Hi!
    Some one which has problem with the scure dialog box then using secure printing?
    then we print in Adobe acrobat reader X 10.0.1 the dialog box for entring your pin nummer appearing under acrobat, causeing the program to locking until you go to the dialog box and clicking on it and enter the pin. The problem is that adobe not showing the dialog box in front of the printing overall dialog.
    had nog problem with the old 9, it started then we uppgraded. Haw tride a nother driver but haw same issue. And all other programs works greate, word, notepat etc so it is just Adobe that has the problem.. ?
    /J

    Hi!
    Its´s XP sp3 and the printer is a network printer(Toshiba e-studio 4520c)  running a PCL6 driver.
    Screen capture is not so much to see i think, running Swedish interface to. The ordinary dialogbox för printing is the first thing thats pops up, and then adobe reader frezes because the secund box pops up under adobe, you can click on it in the "toolbar" to continue. One thing that is diffrent when you print in adobe is that you can se on the "toolbar" for the popup box for the pin/password box is a Adobe icon on it. It is not so in example when printing in word, ie8 etc.
    The problem is that many users dont see it and thinks the program has stopt working.
    Im now going to try the PS driver from toshibas homepage..
    thanks for help!

  • Problem with file dialog (root frame)

    Hi guys
    I�m having a problem with open up a filedialog.
    I have a rendered jlist and the are some items inside. The user, can right click any item and choose from a list some commands (print, save, update etc)
    Everything works fine but when he clicks the SAVE option (again, right click and choose save)
    FileDialog fd = new FileDialog(new JFrame(),"Save PAX list",FileDialog.SAVE);
    I cannot use new JFrame() (as I did above) because it might block the application.
    For this I�m trying to get the root by:
    Component c = SwingUtilities.getRoot((Component)e.getSource());
    JFrame myFrame = (JFrame)c;
    And than:
    FileDialog fd = new FileDialog myFrame,"Save PAX list",FileDialog.SAVE);
    This get me a null frame :- (
    Anyone?

    The following worked on a "normal" menu item. I didn't test it on a "popup" menu item:
    JMenuItem mi = (JMenuItem)e.getSource();
    JPopupMenu popup = (JPopupMenu)mi.getParent();
    Component c = SwingUtilities.windowForComponent(popup.getInvoker());
    System.out.println(c);

  • Custom exception problems with ADF framework

    Hi,
    I have problems with the exception handling in an web service Java class (POJO).
    In this class I throw my own exception WsException-class which extends the normal Exception-class.
    The class WebservicesAppModule extends the oracle.jbo.ApplicationModule.
    In the following I first describe the web service class and then the three tests a)-c).
    In test b) you can find my main problem.
    Web service Java class (POJO):
    public Element check(Element element) throws WsException{   
    WebservicesAppModule am = null;
    try {
    // 1) system error
    // if I comment the next line out, then am = null and a NullPointerException is thrown which appear as NullPointerException in the SOAP response
    am = (WebservicesAppModule)Configuration.createRootApplicationModule(_am,_cf);
    if(value == null){
    // 2) application error
    WsException wsex = new WsException();
    wsex.addErrorCode(WsException.C_INVALID_BANK_CONNECTION);
    throw wsex;
    } else if (value2 == null){
    // 3) explicit system error
    throw new NullPointerException();
    }catch(WsException wsex){
    // 4) application error
    throw wsex;
    }catch(Throwable ex){
    // 5) system error
    log.debug("Technischer Fehler", ex);
    WsException wsex = new WsException("system error");
    wsex.addErrorCode(WsException.C_NOK);
    throw wsex;
    } finally {
    if (_am != null) {
    Configuration.releaseRootApplicationModule(am, false);
    Test a):
    - The WebservicesAppModule is initialized (1)
    - value = null, so the process run in the "application error" if-block (2)
    - The WsException is thrown and catched in the "application error" catch-block (4)
    The SOAP repsonse is okay:
    --- Response ---
    HTTP/1.1 100 Continue
    Server: Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)
    Date: Thu, 20 Jul 2006 09:43:39 GMT
    HTTP/1.1 500 Internal Server Error
    Date: Thu, 20 Jul 2006 09:43:55 GMT
    Server: Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)
    Content-Length: 520
    Connection: Close
    Content-Type: text/xml; charset=utf-8
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <SOAP-ENV:Body>
    <SOAP-ENV:Fault>
    <faultcode>SOAP-ENV:Server.Exception:</faultcode>
    <faultstring>[11000, 10001] [de.test.webservices.WsException]</faultstring>
    <faultactor>/app-Webservices-context-root/WebServices</faultactor>
    </SOAP-ENV:Fault>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    Test b):
    - The WebservicesAppModule is NOT initialized (the line is comment out) (1)
    - The process run in system error catch-block (5)
    In the SOAP repsonse I expected the following <faultstring> (like in test c) )
    <faultstring>system error: [10000] [de.test.webservices.WsException]</faultstring>
    and not
    <faultstring> [java.lang.NullPointerException]</faultstring>
    What´s the problem?
    --- Response ---
    HTTP/1.1 100 Continue
    Server: Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)
    Date: Thu, 20 Jul 2006 08:59:12 GMT
    HTTP/1.1 500 Internal Server Error
    Date: Thu, 20 Jul 2006 09:01:02 GMT
    Server: Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)
    Content-Length: 506
    Connection: Close
    Content-Type: text/xml; charset=utf-8
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <SOAP-ENV:Body>
    <SOAP-ENV:Fault>
    <faultcode>SOAP-ENV:Server.Exception:</faultcode>
    <faultstring> [java.lang.NullPointerException]</faultstring>
    <faultactor>/app-Webservices-context-root/WebServices</faultactor>
    </SOAP-ENV:Fault>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    Test c):
    - The WebservicesAppModule is initialized (1)
    - value != null, so the process run to the next if-block (2)
    - value2 == null, so the process run in the "explicit system error" (3)
    - The WsException is thrown and catched in the "system error" catch-block (5)
    This test shows that not the NullPointerException of Test b) is the problem.
    This response is expected in Test b).
    --- Response ---
    HTTP/1.1 100 Continue
    Server: Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)
    Date: Thu, 20 Jul 2006 13:53:46 GMT
    HTTP/1.1 500 Internal Server Error
    Date: Thu, 20 Jul 2006 13:54:19 GMT
    Server: Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)
    Content-Length: 533
    Connection: Close
    Content-Type: text/xml; charset=utf-8
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <SOAP-ENV:Body>
    <SOAP-ENV:Fault>
    <faultcode>SOAP-ENV:Server.Exception:</faultcode>
    <faultstring>system error: [10000] [de.test.webservices.WsException]</faultstring>
    <faultactor>/app-Webservices-context-root/WebServices</faultactor>
    </SOAP-ENV:Fault>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    What is the cause for the false <faultstring> in test b)? Where set the the ADF framework the NullPointerException and how can I avoid that?
    Thanks and best regards,
    Tobias

    Hi,
    I have problems with the exception handling in an web service Java class (POJO).
    In this class I throw my own exception WsException-class which extends the normal Exception-class.
    The class WebservicesAppModule extends the oracle.jbo.ApplicationModule.
    In the following I first describe the web service class and then the three tests a)-c).
    In test b) you can find my main problem.
    Web service Java class (POJO):
    public Element check(Element element) throws WsException{   
    WebservicesAppModule am = null;
    try {
    // 1) system error
    // if I comment the next line out, then am = null and a NullPointerException is thrown which appear as NullPointerException in the SOAP response
    am = (WebservicesAppModule)Configuration.createRootApplicationModule(_am,_cf);
    if(value == null){
    // 2) application error
    WsException wsex = new WsException();
    wsex.addErrorCode(WsException.C_INVALID_BANK_CONNECTION);
    throw wsex;
    } else if (value2 == null){
    // 3) explicit system error
    throw new NullPointerException();
    }catch(WsException wsex){
    // 4) application error
    throw wsex;
    }catch(Throwable ex){
    // 5) system error
    log.debug("Technischer Fehler", ex);
    WsException wsex = new WsException("system error");
    wsex.addErrorCode(WsException.C_NOK);
    throw wsex;
    } finally {
    if (_am != null) {
    Configuration.releaseRootApplicationModule(am, false);
    Test a):
    - The WebservicesAppModule is initialized (1)
    - value = null, so the process run in the "application error" if-block (2)
    - The WsException is thrown and catched in the "application error" catch-block (4)
    The SOAP repsonse is okay:
    --- Response ---
    HTTP/1.1 100 Continue
    Server: Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)
    Date: Thu, 20 Jul 2006 09:43:39 GMT
    HTTP/1.1 500 Internal Server Error
    Date: Thu, 20 Jul 2006 09:43:55 GMT
    Server: Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)
    Content-Length: 520
    Connection: Close
    Content-Type: text/xml; charset=utf-8
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <SOAP-ENV:Body>
    <SOAP-ENV:Fault>
    <faultcode>SOAP-ENV:Server.Exception:</faultcode>
    <faultstring>[11000, 10001] [de.test.webservices.WsException]</faultstring>
    <faultactor>/app-Webservices-context-root/WebServices</faultactor>
    </SOAP-ENV:Fault>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    Test b):
    - The WebservicesAppModule is NOT initialized (the line is comment out) (1)
    - The process run in system error catch-block (5)
    In the SOAP repsonse I expected the following <faultstring> (like in test c) )
    <faultstring>system error: [10000] [de.test.webservices.WsException]</faultstring>
    and not
    <faultstring> [java.lang.NullPointerException]</faultstring>
    What´s the problem?
    --- Response ---
    HTTP/1.1 100 Continue
    Server: Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)
    Date: Thu, 20 Jul 2006 08:59:12 GMT
    HTTP/1.1 500 Internal Server Error
    Date: Thu, 20 Jul 2006 09:01:02 GMT
    Server: Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)
    Content-Length: 506
    Connection: Close
    Content-Type: text/xml; charset=utf-8
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <SOAP-ENV:Body>
    <SOAP-ENV:Fault>
    <faultcode>SOAP-ENV:Server.Exception:</faultcode>
    <faultstring> [java.lang.NullPointerException]</faultstring>
    <faultactor>/app-Webservices-context-root/WebServices</faultactor>
    </SOAP-ENV:Fault>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    Test c):
    - The WebservicesAppModule is initialized (1)
    - value != null, so the process run to the next if-block (2)
    - value2 == null, so the process run in the "explicit system error" (3)
    - The WsException is thrown and catched in the "system error" catch-block (5)
    This test shows that not the NullPointerException of Test b) is the problem.
    This response is expected in Test b).
    --- Response ---
    HTTP/1.1 100 Continue
    Server: Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)
    Date: Thu, 20 Jul 2006 13:53:46 GMT
    HTTP/1.1 500 Internal Server Error
    Date: Thu, 20 Jul 2006 13:54:19 GMT
    Server: Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)
    Content-Length: 533
    Connection: Close
    Content-Type: text/xml; charset=utf-8
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <SOAP-ENV:Body>
    <SOAP-ENV:Fault>
    <faultcode>SOAP-ENV:Server.Exception:</faultcode>
    <faultstring>system error: [10000] [de.test.webservices.WsException]</faultstring>
    <faultactor>/app-Webservices-context-root/WebServices</faultactor>
    </SOAP-ENV:Fault>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    What is the cause for the false <faultstring> in test b)? Where set the the ADF framework the NullPointerException and how can I avoid that?
    Thanks and best regards,
    Tobias

  • Keyboard problems with joptionpane.ShowConfirm

    hello,
    I am using show confirm dialog and there is a yes and no button with it.
    I want the software to exit when the user clicks yes button.
    the code works fine when the user uses mouse. but when I use the enter key on yes or no button, the application exits in both the cases.
    further more if I perform the same action with the space bar on the keyboard it still works fine and when I hit space bar on the no button the application stays. but with enter key the application doesn't seam to take the right yes/ no value in the integer.
    what's the problem
    and how do I correct it.
    thanks
    Krishnakant.

    import javax.swing.*;
    class Testing
       public Testing()
          try{UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");}
          catch(Exception e){e.printStackTrace();}
          int btn = JOptionPane.showConfirmDialog(null,"tab to a button, then press [ENTER]",
                                                             "",JOptionPane.YES_NO_OPTION,-1);
          String selection = "Escape (or 'x') selected";
          if(btn == 0) selection = "Selection = 'Yes'";
          else if(btn == 1)  selection = "Selection = 'No'";
          JOptionPane.showMessageDialog(null,selection);
          System.exit(0);
      public static void main(String[] args){new Testing();}
    }

  • Custom Tag -- Custom Component problems with iframes

    I have a "project" component that originally iterated over a list of models and created/renderered the corresponding (and fairly complex) interactive UI components for those models. On the client-side, the output from these were then organized neatly into "tabs" via CSS ... all on one page. Since these UI Components are so hefty, when any iteraction was done on one of them, the whole page had to re-render and things got just plain slow. To get around this limitation, I decided to have my "project" component no longer create the UI components himself, but instead generate an IFRAME that points to a page that will generate a single component. This way, any iteraction will just cause that single IFRAME to refresh.
    Due to the fact that an IFRAME can only be populated by using the src attribute, I have created a page that contains a JSF View (<faces:view>) and inside is a single custom tag of mine (<mine:displayView>). Let's call this page singleDisplayView.jsf. I create iframes that point to singleDisplayView.jsf with different request params for each (singleDisplayView.jsf?modelName=Foo, singleDisplayView.jsf?modelName=Bar, etc.)
    The displayView tag has one attribute called requestQueryString and I use the tag like so:
    <t:displayView requestQueryString="<%=request.getQueryString()%>" />The displayView tag's class is DisplayViewTag. In DisplayViewTag::setProperties(UIComponent uiComponent) method, I get the model name out of the request map and set this property on the UIComponent.
    The problem is that I'm noticing that as the main page (that contains these frames) loads, setProperties() is only being called twice. After that, the components created by subsequent iframes just seem to be using the modelName from the second frame.
    Is there a syncronization issue I don't understand?
    Any ideas?
    Any help would be much appreciated.
    Thanks in advance,
    Mark

    On a possibly related note, I read this in an article of the JSF application lifecycle:
    In the first phase of the JSF lifecycle -- restore view -- a request comes
    through the FacesServlet controller. The controller examines the request and
    extracts the view ID, which is determined by the name of the JSP page.Could it be that the lifecycle is trying to reuse components from a single view, since all these iframes are pointing to the same page?

  • Problems with message dialog

    import javax.swing.*;
    JFrame frame = new JFrame();
    JOptionPane.showMessageDialog(frame, "message');
    the only problem is that my message is too long for the dialog box, is there any way I can shrink the size of it, or perhaps stack the lines on top of each other within the same dialog box

    the html code did not work, it instead was just shown as part of the string. the program did not seperate it and break the line. any other suggestions???

  • Problems with JOptionPane and intrrupting

    1.when i interrupt in main a thread,
    and the thread is executing a JOptionPane-Message,
    the interrupt is lost, if the thread is asking isInterrupted() bevor show Message, the Interrupt is visible. ITS A BUG?
    2. if a thread is creating a new JFrame() and obtains an interrupt, a error of JVM is reported:
    AWT blocker activation interrupted:
    java.lang.InterruptedException
    What can i do? please help me???

    Well what are you trying to interrupt, and why?
    I think the interrupt was meant to be used for when the application is shutting down. So those two problems of yours seem normal. Most other application wouldn't close while a dialog box was up, right?
    If you're trying to synchronize threads, look into the wait() and notify() methods in the Object class.

  • Custom DataGrid problems with Comboboxes

    I am using a custom datagrid with comboboxes and
    colorpickers. I found this code on the web and adapted it to work
    with my code. The only problem is that if you pull down a combobox
    and then click somewhere outside without selecting anything, it
    seems to erase the data in the dataprovider arraycollection and so
    'value' in the set data method becomes null.

    This is not a bug if I understand you properly. I believe most people would wish anything which is obtained via the tv to be backed up, which is why the content is transferred. If you want it to remain available on the tv you will need to sync it back to it.

  • Truly Terrible Customer Service- Problems With Lenovo U410

    Hello everyone,
    I would like to share my Lenovo Customer Service experience. 
    While on holidays in Poland last August, I decided to buy a new laptop in one of the big electronic stores. The laptop, however, developed a fault on the second day. I thought it was a case of bad drivers causing the problem. After I returned from my holidays, the fault was still there.
    I contacted the Lenovo Customer Service who requested a proof of purchase. I explained that the laptop was bought in Poland on holidays and sent them on the receipt. A day later, I got an email saying:
    "Your machine has been booked in for a full repair at our service centre. Thank you for your proof of purchase. 
    In 2-3 working days you will receive a letter containing instructions regarding the booking of your collection. The letter will also contain very important terms and conditions in particular with regards to data loss. 
    Please follow the instructions and your machine will be repaired under warranty."
    A few days later the machine was taken off me by a DPD courier for almost 2 weeks. In the meantime I had no other option but to use my father's laptop to do my final year college project. 
    I was delighted when I got the email:
    "We have completed the servicing of your item.
    Your item is now being packed and prepared for dispatch. You can track your package online..."
    However, 30 mins after using the "newly repaired" laptop, the stripy screen came back! Needless to say, I wasn't happy. I contacted Lenovo again, their customer service agent apologised for the bad experience and said that the laptop will need to be sent back again. For me that meant another 2 weeks without the laptop!
    This Tuesday, I finally  received the laptop back. After using the laptop for an hour or so, the horrible stripy screen appeared in front of my eyes! This time I was absolutely infuriated!! The laptop was sent back twice and the same problem persisted. I got my phone and rang the Customer Service to ask what the hell is happening?! 
    The answer I got this time was that the laptop was purchased in Poland and therefore it is not covered by the International warranty!! A few months of dealing with the company, a couple of phone calls and sending the laptop off for a repair twice to be told that they didn't fix it because the machine is not covered by the International Warranty?! 
    This is my short story of my terrible customer experience! I am not satisfied with the way this company operates, takes my laptop off me, sends the laptop off to their repair centre in Germany to then say that they cannot fix it?! Could anyone who works for Lenovo please explain to me where is the logic in that?

    I find it absolutely deplorable of Lenovo that there has been no posted response to this customer service issue. I have been trying to decide for a while now if it was worth purchasing a Yoga 2 Pro as it looked to have all the specs of a PC Hybrid I was hoping for. Well....how wrong could I have been...I had no idea how appalling the customer service is from this company!
    Firstly, in the UK...there have been some nightmare stories of faulty items and ridiculous product shipping delays that just seem to keep changing without any thought for the consumer in explaining what the hold up is. If you want to see a fantastic daily updated example of this alone just have a look at the Lenovo UK Facebook product page. Just reading it for ten minutes is tragic. There are so many upset customers in there that it almost seems comical. 
    The shipping delays are pathetic, they will glady take people's money (including warranties on items that arent there!) and hold it in the Lenovo bank accounts but the slow service and response to those with faults displays a complete disregard for the consumer. I can understand a company being unable to keep up with high demand of a product if it is very good and in demand but this needs to be addressed with admission in communication. Simply advertising a product that people cannot access and dealing with the irate customer-in-waiting afterwards is not acceptable.
    Let it be known that Lenovo through their own incompetence have lost a customer before he even purchased anything today. I can only hope that others considering making a purchase will see further posts like this and feel deterred in the same way. That way, Lenovo may finally see that they really need to up their game in terms of service and quality control. To the person that made this post, I can only feel sympathy for the problems you had with them and can only say that you are certainly not alone! Check out their UK Facebook page to see just how terrible the service is (including choosing to ignore the more upset customers while blowing the trumpet whenever someone's problem is "sorted"!).

  • STRANGE problem with JOptionPane.showMessageDialog .. HELP!!!

    Please look at the code below and tell me what is wrong with it and my code is very very very simple!!! And I can't seem to understand why this error is coming up.
    import javax.swing.JOptionPane;
    public class ShowMessageDialog {
    public ShowMessageDialog() {
    //empty constructor for now
    public void show () {
    JOptionPane.showMessageDialog (null, "Please try again!!", "Error Message", JOptionPane.ERROR_MESSAGE);
    }This class is invoked by another class named SendPacketBack which does nothing but checks for one condition in an if statment and then make an object of this class and calls this show() method and this error comes up. Please look at the error below and tell me why it is telling me java.lang.NoClassDefFoundError and not telling me which class???
    java.lang.NoClassDefFoundError
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:141)
         at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:62)
         at sun.awt.motif.MToolkit.<clinit>(MToolkit.java:81)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:141)
         at java.awt.Toolkit$2.run(Toolkit.java:748)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:739)
         at javax.swing.ImageIcon.<init>(ImageIcon.java:205)
         at javax.swing.LookAndFeel$1.createValue(LookAndFeel.java:274)
         at javax.swing.UIDefaults.getFromHashtable(UIDefaults.java:184)
         at javax.swing.UIDefaults.get(UIDefaults.java:129)
         at javax.swing.MultiUIDefaults.get(MultiUIDefaults.java:44)
         at javax.swing.UIDefaults.getIcon(UIDefaults.java:410)
         at javax.swing.UIManager.getIcon(UIManager.java:537)
         at javax.swing.plaf.basic.BasicOptionPaneUI.getIconForType(BasicOptionPaneUI.java:555)
         at javax.swing.plaf.basic.BasicOptionPaneUI.getIcon(BasicOptionPaneUI.java:543)
         at javax.swing.plaf.basic.BasicOptionPaneUI.createMessageArea(BasicOptionPaneUI.java:313)
         at javax.swing.plaf.basic.BasicOptionPaneUI.installComponents(BasicOptionPaneUI.java:154)
         at javax.swing.plaf.basic.BasicOptionPaneUI.installUI(BasicOptionPaneUI.java:122)
         at javax.swing.JComponent.setUI(JComponent.java:449)
         at javax.swing.JOptionPane.setUI(JOptionPane.java:1693)
         at javax.swing.JOptionPane.updateUI(JOptionPane.java:1715)
         at javax.swing.JOptionPane.<init>(JOptionPane.java:1678)
         at javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:828)
         at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:642)
         at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:613)
         at cc.ShowMessageDialogue.show(ShowMessageDialogue.java:13)
         at cc.SendPacketBack.sendPacketTo(SendPacketBack.java:62)
    I would appreciate any suggestions or advice to solve this issue.
    Regards
    Khurram

    Yes X server is alright. I should have mentioned one thing though in my previous email is that there is another class which extends JFrame and is part of the package that this class is in also running in the background but that class does not interact with this class at all and does not even know if it exists!
    I don't know if that thing is causing some kind of problem which is not coming up here?
    Khurram

  • WCF-Custom performance problem with large response messages

    We're trying to debug a performance issue in Biztalk 2013 when using a WCF-Custom adapter to call en external WCF-enpoint.
    From a Biztalk orchestration we're calling en external WCF-service to retrieve an xml message sometimes containing a lot of Base64 encoded data. The response message can be up to 10Mb in size. The send port is very slow in retrieving the response
    and a 10Mb message can take up to 3min to retrieve. For comparison we've made a console program with the same service reference and binding as the Biztalk adapter uses and we can retrieve the same message in about 3 seconds.
    The WCF is using binary encoding over http and we've set the maxMessageSize, maxBufferSize and maxBufferPoolSize to Int32-MaxValue. We realise that using Biztalk there will be overhead because the message is put into the message box but we're unsure how
    to improve the performance of the send port.
    Any suggestions?

    Hello,
    There are certain Optimization you can do with your BizTalk.
    1)The first thing that I would do is to check the BizTalk SQL server jobs are running correctly
     (SQL Sever Mgmt Studio –> SQL Server Agent –> Jobs). Lookout for the jobs with the word “CleanUp” in them.
    2)Another check that you could do is to verify the entries in the Spool table
     (Database[@Name='BizTalkMsgBoxDb']/Table[@Name='Spool']). Ideally, the number of entries should not be HUGE
     (as in not over 100/200 entries)
    3) Create seperate host and host handler for your send Port.
    4) Set The MaxReceiveInterval from adm_service(BizTalk Management DB) class table 100 ms from 500(By default).
    5)Increased the Throttling Settings Internal message queue size to 1000 from 100 In new Application Host.
    6)Set the Maximum number of messaging engine threads per CPU to 40 (By default it is 20).
    7) Add Max connection in your BTSNTSVC.exe.config file
    <system.net>
                <connectionManagement>
                            <add address
    = “*” maxConnections = “300” />
                </connectionManagement>
    </system.net>
    For other setting you can look for BizTalk Optimization Guide
    http://www.microsoft.com/en-ca/download/details.aspx?id=10855 
    Above setting are for generic performance enhancement purpose.
    Note: You can verify through Orchestration debugger or Orchestration tracing how much time send port is and pipeline is taking to publish the message to Biz Talk again .
    These will give you better picture what more settings you need to apply .
    Thanks
    Abhishek

  • Custom Tag Problem With iPlanet

    Hi,
    I've followed the instructions for creating Custom Tags located at: http://docs.iplanet.com/docs/manuals/enterprise/41/rn41sp9.html#18776. I'm using the examples provided and am still getting the:
    org.apache.jasper.JasperException: Unable to open taglibrary /jsps/test-tags.jar : com.sun.xml.tree.TextNode
    error. I've followed the instructions "Make sure you have the DOCTYPE in your taglib.tld..." but I still get the error.
    iPlanet 4.1 Enterprise on Windows 2000
    Any ideas?
    Thanks in advance.

    Hey i am also getting the same error, please let me know if u had solved this problem. i have copied the error message below
    [25/Feb/2002:15:00:46] info ( 260): JSP: JSP1x compiler threw exception
    org.apache.jasper.JasperException: Unable to open taglibrary /jsps/test-tags1.jar : in is null
         at org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEventListener.java:708)
         at org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingListener.java:119)
         at org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:190)
         at org.apache.jasper.compiler.Parser.parse(Parser.java:1048)
         at org.apache.jasper.compiler.Parser.parse(Parser.java:1022)
         at org.apache.jasper.compiler.Parser.parse(Parser.java:1018)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:173)
         at com.netscape.server.http.servlet.NSServletEntity.load(NSServletEntity.java:230)
         at com.netscape.server.http.servlet.NSServletEntity.update(NSServletEntity.java:149)
         at com.netscape.server.http.servlet.NSServletRunner.Service(NSServletRunner.java:453)
    [25/Feb/2002:15:00:46] warning ( 260): Internal error: Failed to get GenericServlet. (uri=/web/jsps/test-tags.jsp,SCRIPT_NAME=/web/jsps/test-tags.jsp)

Maybe you are looking for

  • FM returns wrong total value for Limit type PO's

    Hi all, I am working on SRM 5.0 (SP13) ECS. I have implemented the BADI "BBP_WFL_APPROVAL_BADI" for determining the Approvers for PO whenevr a PO is changed.If the diference between the Old PO value and new PO value is > 1000 and the approval text fi

  • Safari Displays Pages in Foreign Font

    After the last software update, many pages look like the following screenshot in Safari. Some sites are fine, others have weird fonts all over them. How do I fix this? http://img641.imageshack.us/img641/979/screenshot20100130at112.png

  • Monitor wont play sound

    I have an HP 1740 Monitor with built in speakers I am running Linux Mint 13 (32bit) I had to download adobe flash player and i can hear the Linux noises. Ive cxhecked my speaker in put and output on the computer itself and its all normal. however in

  • First- "R" - reset - doesn't seem right

    I have a 4th Gen that gives me intermittent trouble (for example, I choose an album to play, and it just skips through all the songs, then goes back to the "Artist" heading). When I do the first stage of troubleshooting - the reset (hold down menu an

  • Can't get a decent SD DVD from DVCPRO HD material

    We made the jump to HD and started shooting in DVCPRO HD (1080i60). We still deliver all of our final shows on standard DVD. I've been trying all week to come up with a workflow that will make a decent DVD from DVCPRO HD timelines, but I just can't g