Swing app in JDK6 continues to rendering slow in Windows Terminal Server

Hi,
Because Swing apps create interfaces internally and not using default OS APIs,
when running into a Windows Terminal Server client, there is no way to optimize
rendering. Windows Terminal Server and Linux FreeNX use a mechanism to send
to client only commands to render the windows. But, because the way Swing works,
not totally integrated to OS APIs, it's not possible for terminal servers to do this,
and these servers render Swing like images, something like VNC do, very slower than.
I have tested native apps and AWT apps, and the difference is very significant,
something like 50-70% faster.
Is there some project in Swing APIs or java.net open-sources to better this?

We are also seeing this issue with a Compiere implementation. With 10 distributed sites across the US, our client wanted to use Windows Terminal Services to simplify the client desktop management of the Swing application.
But performance is terrible...and screen painting issues a real problem. We are also on JDK5 still, so I'm discouraged to see that JDK6 doesn't appear to offer much improvement?
Is there any project afoot to address this issue for installations using terminal services?
Thanks,
Peter

Similar Messages

  • Is Apps compatible with Windows Terminal Server

    Hi
    Is Apps (any version but most importantly 11i) and for that matter the Database compatible with Windows Terminal Server? I am working with a company who are trying to determine if their IT strategy with Oracle is watertight moving forward, and we have early indications that the answer to the above, is 'No', but it would be nice to have a definitive answer... Anyone know of any resources that I can look at to obtain the above?
    Thanks and Best Regards
    Toby Hazlewood

    No. This is not supported
    Rajesh Alex

  • Query very slow on Windows 2003 Server

    Hi,
    Our customer is running 10g on Windows 2003 server. Some queries perform badly. I imported the data into a 10g DB on Linux (at our office) to analyze and test. Strange enough the same query takes more than 10 times longer to run on the Windows machine compared to the Linux. The Windows machine is dedicated to Oracle, it is not 'overloaded'.
    SELECT
    plan_task.id_task,
    plan_task.task_id,
    plan_task.taskdef_y_n,
    plan_task.description,
    plan_task.status,
    plan_task.team_id,
    plan_task.activity_id,
    plan_task.task_start_datetime,
    plan_task.district_id,
    plan_task.task_end_datetime,
    plan_task.taskdef_freq_code,
    plan_task.taskdef_start_time,
    plan_task.taskdef_end_time,
    plan_task.order_nr
    d,
    PREVENT.PLAN_PERSONS_AVAILABLE_SHORT(ID_TASK) PERS_OK,
    PREVENT.PLAN_MATERIALS_AVAILABLE_SHORT(ID_TASK) MAT_OK
    FROM PREVENT.PLAN_TASK
    WHERE (TASKDEF_Y_N='N') AND (TASK_START_DATETIME>=to_date(to_char(SYSDATE,'dd-mm-yyyy'),'dd-mm-yyyy'))
    AND (TASK_START_DATETIME<to_date(to_char(SYSDATE,'dd-mm-yyyy'),'dd-mm-yyyy')+1)
    ORDER BY DESCRIPTION;
    On LINUX (Intel 2 GHz, 2 Gb mem) takes 0,5 seconds to execute (46 rows returned)
    ================================================================================
    Plan
    SELECT STATEMENT ALL_ROWSCost: 27 Bytes: 2,436 Cardinality: 29                     
         4 SORT ORDER BY Cost: 27 Bytes: 2,436 Cardinality: 29                
              3 FILTER           
                   2 TABLE ACCESS BY INDEX ROWID TABLE PREVENT.PLAN_TASK Cost: 26 Bytes: 2,436 Cardinality: 29      
                        1 INDEX RANGE SCAN INDEX PREVENT.PLAN_TASK_START_DATETIME_I Cost: 2 Cardinality: 30
    On WINDOWS (Intel 2 GHz, 2 Gb mem) takes 11 seconds to execute (46 rows returned)
    =================================================================================
    Plan
    SELECT STATEMENT ALL_ROWSCost: 35 Bytes: 3,276 Cardinality: 39                     
         4 SORT ORDER BY Cost: 35 Bytes: 3,276 Cardinality: 39                
              3 FILTER           
                   2 TABLE ACCESS BY INDEX ROWID TABLE PREVENT.PLAN_TASK Cost: 34 Bytes: 3,276 Cardinality: 39      
                        1 INDEX RANGE SCAN INDEX PREVENT.PLAN_TASK_START_DATETIME_I Cost: 2 Cardinality: 40
    NOTEs:
    - The data is exactly the same on both machines
    - I analyzed_schema on both machines/DB's before running the query
    - The SGA size en DB_BUFFERS are (almost) set to the same value
    - Oracle version is the same: 10g

    On Windows:
    - I exported the data
    - Re-created my 2 tablespaces, to set: extent management local, uniform 1M
    - imported the data
    - dbms_stats.gather_schema_stats( option=>'GATHER')
    Plan
    SELECT STATEMENT ALL_ROWSCost: 36 Bytes: 3,32 Cardinality: 40                     
         4 SORT ORDER BY Cost: 36 Bytes: 3,32 Cardinality: 40                
              3 FILTER           
                   2 TABLE ACCESS BY INDEX ROWID TABLE PREVENT.PLAN_TASK Cost: 35 Bytes: 3,32 Cardinality: 40      
                        1 INDEX RANGE SCAN INDEX PREVENT.PLAN_TASK_START_DATETIME_I Cost: 2 Cardinality: 41
    Tested, takes 7 seconds now (was 11), but this is still slow compared to the run on Linux
    Grt, Stephan
    Edited by: Stephan van Hoof on Jan 9, 2009 8:41 PM

  • Windows Terminal Server 2012 wont publish any more remote apps!

    I have a weird problem with our new Windows 2012 Terminal Server. We have already published one application through a session collection via Remote Desktop Services. We now have the need to publish another application. When I click on the "Tasks"
    drop down menu and select "Publish RemoteApp Programs" I get an error of "Server.domain.local is not available on the network. Verify that the server is available on the network or remove the server from the collection"
    Does anyone have any ideas why I am seeing this?
    Thanks

    Hi,
    Thank you for your posting in Windows Server Forum.
    First of all please check that you have enough permission or performing with admin account. 
    I have installed many RemoteApp in my environment and can’t find this error until now. 
    Have you recently made any changes in your environment before facing this issue? 
    Did you tried to restart the server and then try to launch new Remote App?
    By the way, can you let us know which program you want to publish as Remote App, so if possible then we can try to install and let you know the result.
    In meantime, please try to publish new RemoteApp with PowerShell command as Administrator and let us know the result. You can try below command. In this example, we create a RemoteApp to deliver WordPad. We use the following command;
    new-rdremoteapp -Alias Wordpad -DisplayName WordPad -FilePath "C:\Program Files\Windows NT\Accessories\wordpad.exe" -ShowInWebAccess 1 -collectionname MySessionCollection -ConnectionBroker LS01.CRFB.Local
    For more information, refer beneath article.
    Managing Remote Apps using PowerShell on Windows Server 2012
    Hope it helps!
    Thanks.
    Dharmesh Solanki

  • Acrobat 8 and 9 slow scrolling in terminal server or RDP

    Adobe, there have been several postings here regarding the painfully slow scrolling introduced in acrobat 8 and 9 when viewing a multi page PDF via terminal services or RDP. It is discussed here in your forums and other internet forums. Have you a solution? Have you investigated this? It occurs not via a lan connection but a wan connection. You need to access an RDP session via dsl to reproduce this.
    This is not a Microsoft Terminal services or RDP problem. It is an Acrobat problem. This did not occur with Acrobat 7. Thus the current method of fixing is to not install versions of acrobat above 7 or downgrade your Acrobat 8 or 9 install to 7. Not a lasting solution.
    Acrobat, I implore you to investigate this problem and offer a solution.

    I had the slow scrolling problem, too. Just occurred out the blue on December 15, 2010. Here's the simplest solution:
    http://help.adobe.com/en_US/Acrobat/9.0/Standard/WS58a04a822e3e50102bd615109794195ff-7d1b. w.html
    This link deals with the auto scrolling function under "View" at the top of your Adobe Reader page. Basically, with your Adobe document open and watching "auto scrolling" (i.e. your pages scrolling very slowly), hit a number (1-9) to adjust the speed of scrolling. I picked 5.
    Then, go to "View" again and select "Auto Scrolling" to turn off this function.
    Now, re-open your Adobe Reader document (if closed) and you should be able to scroll at a "normal" and not slow pace.
    Hope I'm right with this one.
    Happy Holidays.

  • Windows Terminal Services and Swing

    My large swing application is being accessed remotely using Windows Terminal Services RDP protocol and is performing dreadfully in terms of screen updates. Is there an answer for this problem? Any suggestions?
    Regards
    David

    In my opinion the real problem is not at all in your application.
    1) Window terminal services (RDP)
    Each time that the screen changes is send to client all the screen.
    This is also for mouse moving.
    Using more efficent software, like Citrix that is based on RDP, are
    send to client only the dirrefernces, and mouse moving is managed
    only by client side.
    This gives advantages in performances.
    Window terminal Server, also, needed a strong Server to run, in my
    experiences more than 10 connections my cause a performances
    problems in many cases.
    2) The network
    Is needed an efficient network for ship quicly all data traffic generated
    for that fat application, minimum 100 Mbit.
    If the network is just congestionated for others think (internet browsing,
    an lot of file exchange and so on) the performances of terminal server
    is bad. (terminal server ships a lot of information across the network)
    3) Your application.
    Control if too many repaint() or revalidate() are called.
    For do that simply u can override that methods in this way in your costom components:
    public void repaint()
    super.repaint();
    System.out.println("Repainting of MyComponent");
    the same think for revlidate.
    Now, lanching your application, u can control how many times for transaction those methods are invoked.
    My doubt is that, every time that a repaint or a revalidate occurs,
    Terminal Server reshape all the screen for client (not so sure about
    that)
    I say u that because I have had a similar problem (flickering).
    I have see that flickering was caused by serval repaint invocation
    by swing itself.
    I had solved it simply do that
    public void repaint()
    if (!wBatchMode)
    super.repaint();
    The variable wBatchMode is setted to true (for example in my custom
    JTable) util I append columns and rows.
    If u look for swing code for each column added, the repaint methid is
    invoked.
    When i have finished to populate my component i set the wBatchMode
    variable to false, so the repaint method occurs only one time and no
    flickering occurs.
    So, if is true that Terminal Server for every revalidate/repaint reship
    the screen, this method may be help u.
    Regards

  • Swing app keyboard stops working, mystery ESCAPE keystrokes appear in EDT

    Java 6 Swing app. In our development environment, works great. In QA, they use it for a bit, type in a text field, click out to a Windows XP/7 app, click back in the text field, and the keyboard stops accepting keystrokes. The mouse continues to work, and the Swing app continues to paint to the screen.
    I hooked up a KeyEventDispatcher to listen to what is going on. I'll post a more verbose log at the end of this post, but the short version is this. When the keyboard hangs, the log shows that 'escape' keys are being sent, though we do not do any keystroke injection in our app, ESCAPE or otherwise. Nothing on the Swing app can be determined visually to have focus.
    Just before the app starts hanging, it has a side effect of not being able to be brought into the foreground by clicking on it, if, for example, one was working with Excel or Notepad, then try to click on the JFrame title of the app, or anywhere else on the app frame/internals. Once this condition happens, moving away to another Windows app, then going back to the Swing app, causes the keyboard to stop working and the KeyEventDispatcher to see 'escape' keystrokes being sent out.
    Connecting remotely to the app via JVisualVM/JConsole does not show any of the threads hanging/blocked.
    Sometimes you can work for hours before seeing this problem, and other times, you can start the app up and it happens right away. Once it happens, sometimes you can't recover, and sometimes you can click on a button on a navigator panel on the left side that displays an info panel on the right side, and you can start typing again in text fields.
    Once this problem happens, you can start (or have already running) a completely different Swing app (ex.: StackTrace), and the keyboard will stop working for that app too, even though its running in its own separate VM.
    This problem (ALMOST!) always happen when typing in a Swing text field (JTextField, JTextArea, etc.), clicking on and then typing in a Windows text area (Excel cell, Notepad), then clicking back into the Swing app's text field. A few times, we've gotten this to happen by typing in a text field, tabbing to a button, pressing a button, then tabbing/clicking back into the text field, all without leaving the Swing app. But this latter scenario is rare, usually going to/from Swing/Windows XP/7 apps cause the problem to occur more readily.
    The QA computers normally use Citrix to connect and run the app, but this also happens if we run the app completely locally. But again, this only happens to some computers, all of the ones in the QA department; the development computers (the app has not been released into production yet) does not see this problem.
    I had thought that our problem was this problem (Wrong characters in KeyEvents generated from input of barcode scanner but purposely slowing down the acceptance of KEY_PRESSED and KEY_RELEASED events before allowing them to go on to the Swing app (via a KeyDispatcher) did not solve the problem.
    Also, we had thought it might be a Citrix problem and how it (or does it?) hook into the Windows keyboard. The fact that once one Swing app gets into this keyboard doesn't work and escape keys are being sent out by the EDT can affect another Swing app makes me wonder. We're not seeing any VM exceptions either like this (EXCEPTION_ACCESS_VIOLATION - JRE 6.0_23 - Citrix, windows 2003
    Been trying to get this one solved for over a week, but with no luck. Any help/advice would be appreciated. Thank you in advance for your time.
    P.S. Here's the detailed log info I generated via my KeyEventDispatch listener...
    2011-04-01 11:58:17,493 [AWT-EventQueue-1] DEBUG MyKeyEventDispatcher.dispatchKeyEvent:36 - KEY1-keystroke [java.awt.DefaultKeyboardFocusManager@377369]: java.awt.event.KeyEvent[KEY_PRESSED,keyCode=27,keyText=Escape,keyChar=Escape,keyLocation=KEY_LOCATION_STANDARD,rawCode=27,primaryLevelUnicode=27,scancode=1] on javax.swing.JTextField[,320,28,175x18,layout=javax.swing.plaf.basic.BasicTextUI$UpdateHandler,alignmentX=0.0,alignmentY=0.0,border=com.ep.skin.lnf.framework.utils.internal.RoundedBorder@c3a7c0,flags=296,maximumSize=,minimumSize=,preferredSize=,caretColor=sun.swing.PrintColorUIResource[r=51,g=51,b=51],disabledTextColor=sun.swing.PrintColorUIResource[r=51,g=51,b=51],editable=true,margin=javax.swing.plaf.InsetsUIResource[top=0,left=0,bottom=0,right=0],selectedTextColor=sun.swing.PrintColorUIResource[r=51,g=51,b=51],selectionColor=javax.swing.plaf.ColorUIResource[r=184,g=207,b=229],columns=15,columnWidth=11,command=,horizontalAlignment=LEADING]
    2011-04-01 11:58:17,494 [AWT-EventQueue-1] DEBUG MyKeyEventDispatcher.dispatchKeyEvent:42 - KEY2-ActiveWindow: javax.swing.JFrame[mainFrame,128,128,1024x768,invalid,layout=java.awt.BorderLayout,title=My - HQ - 17601,resizable,normal,defaultCloseOperation=DO_NOTHING_ON_CLOSE,rootPane=javax.swing.JRootPane[,0,0,1024x768,invalid,layout=com.ep.skin.lnf.framework.internal.RootPaneUI$MetalRootLayout,alignmentX=0.0,alignmentY=0.0,border=javax.swing.plaf.BorderUIResource@d0e678,flags=16777673,maximumSize=,minimumSize=,preferredSize=],rootPaneCheckingEnabled=true]
    2011-04-01 11:58:17,496 [AWT-EventQueue-1] DEBUG MyKeyEventDispatcher.dispatchKeyEvent:48 - KEY3-CurrentFocusCycleRoot: javax.swing.JFrame[mainFrame,128,128,1024x768,invalid,layout=java.awt.BorderLayout,title=My - HQ - 17601,resizable,normal,defaultCloseOperation=DO_NOTHING_ON_CLOSE,rootPane=javax.swing.JRootPane[,0,0,1024x768,invalid,layout=com.ep.skin.lnf.framework.internal.RootPaneUI$MetalRootLayout,alignmentX=0.0,alignmentY=0.0,border=javax.swing.plaf.BorderUIResource@d0e678,flags=16777673,maximumSize=,minimumSize=,preferredSize=],rootPaneCheckingEnabled=true]
    2011-04-01 11:58:17,497 [AWT-EventQueue-1] DEBUG MyKeyEventDispatcher.dispatchKeyEvent:54 - KEY4-FocusedWindow: javax.swing.JFrame[mainFrame,128,128,1024x768,invalid,layout=java.awt.BorderLayout,title=My - HQ - 17601,resizable,normal,defaultCloseOperation=DO_NOTHING_ON_CLOSE,rootPane=javax.swing.JRootPane[,0,0,1024x768,invalid,layout=com.ep.skin.lnf.framework.internal.RootPaneUI$MetalRootLayout,alignmentX=0.0,alignmentY=0.0,border=javax.swing.plaf.BorderUIResource@d0e678,flags=16777673,maximumSize=,minimumSize=,preferredSize=],rootPaneCheckingEnabled=true]
    2011-04-01 11:58:17,498 [AWT-EventQueue-1] DEBUG MyKeyEventDispatcher.dispatchKeyEvent:60 - KEY5-FocusOwner: javax.swing.JTextField[,320,28,175x18,layout=javax.swing.plaf.basic.BasicTextUI$UpdateHandler,alignmentX=0.0,alignmentY=0.0,border=com.ep.skin.lnf.framework.utils.internal.RoundedBorder@c3a7c0,flags=296,maximumSize=,minimumSize=,preferredSize=,caretColor=sun.swing.PrintColorUIResource[r=51,g=51,b=51],disabledTextColor=sun.swing.PrintColorUIResource[r=51,g=51,b=51],editable=true,margin=javax.swing.plaf.InsetsUIResource[top=0,left=0,bottom=0,right=0],selectedTextColor=sun.swing.PrintColorUIResource[r=51,g=51,b=51],selectionColor=javax.swing.plaf.ColorUIResource[r=184,g=207,b=229],columns=15,columnWidth=11,command=,horizontalAlignment=LEADING]
    2011-04-01 11:58:17,499 [AWT-EventQueue-1] DEBUG MyKeyEventDispatcher.dispatchKeyEvent:66 - KEY6-PermanentFocusOwner: javax.swing.JTextField[,320,28,175x18,layout=javax.swing.plaf.basic.BasicTextUI$UpdateHandler,alignmentX=0.0,alignmentY=0.0,border=com.ep.skin.lnf.framework.utils.internal.RoundedBorder@c3a7c0,flags=296,maximumSize=,minimumSize=,preferredSize=,caretColor=sun.swing.PrintColorUIResource[r=51,g=51,b=51],disabledTextColor=sun.swing.PrintColorUIResource[r=51,g=51,b=51],editable=true,margin=javax.swing.plaf.InsetsUIResource[top=0,left=0,bottom=0,right=0],selectedTextColor=sun.swing.PrintColorUIResource[r=51,g=51,b=51],selectionColor=javax.swing.plaf.ColorUIResource[r=184,g=207,b=229],columns=15,columnWidth=11,command=,horizontalAlignment=LEADING]
    2011-04-01 11:58:17,501 [AWT-EventQueue-1] DEBUG MyKeyEventDispatcher.dispatchKeyEvent:74 - KEY7-stacktrace...
    com..client.util.MyKeyEventDispatcher$StackTraceGenerationException: This exception was created to generate a stack trace, and can be safely ignored.
         at com..client.util.MyKeyEventDispatcher.dispatchKeyEvent(MyKeyEventDispatcher.java:73)
         at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    2011-04-01 11:58:17,504 [AWT-EventQueue-1] DEBUG MyKeyEventDispatcher.dispatchKeyEvent:36 - KEY1-keystroke [java.awt.DefaultKeyboardFocusManager@377369]: java.awt.event.KeyEvent[KEY_RELEASED,keyCode=27,keyText=Escape,keyChar=Escape,keyLocation=KEY_LOCATION_STANDARD,rawCode=27,primaryLevelUnicode=27,scancode=1] on javax.swing.JTextField[,320,28,175x18,layout=javax.swing.plaf.basic.BasicTextUI$UpdateHandler,alignmentX=0.0,alignmentY=0.0,border=com.ep.skin.lnf.framework.utils.internal.RoundedBorder@c3a7c0,flags=296,maximumSize=,minimumSize=,preferredSize=,caretColor=sun.swing.PrintColorUIResource[r=51,g=51,b=51],disabledTextColor=sun.swing.PrintColorUIResource[r=51,g=51,b=51],editable=true,margin=javax.swing.plaf.InsetsUIResource[top=0,left=0,bottom=0,right=0],selectedTextColor=sun.swing.PrintColorUIResource[r=51,g=51,b=51],selectionColor=javax.swing.plaf.ColorUIResource[r=184,g=207,b=229],columns=15,columnWidth=11,command=,horizontalAlignment=LEADING]
    2011-04-01 11:58:17,506 [AWT-EventQueue-1] DEBUG MyKeyEventDispatcher.dispatchKeyEvent:42 - KEY2-ActiveWindow: javax.swing.JFrame[mainFrame,128,128,1024x768,invalid,layout=java.awt.BorderLayout,title=My - HQ - 17601,resizable,normal,defaultCloseOperation=DO_NOTHING_ON_CLOSE,rootPane=javax.swing.JRootPane[,0,0,1024x768,invalid,layout=com.ep.skin.lnf.framework.internal.RootPaneUI$MetalRootLayout,alignmentX=0.0,alignmentY=0.0,border=javax.swing.plaf.BorderUIResource@d0e678,flags=16777673,maximumSize=,minimumSize=,preferredSize=],rootPaneCheckingEnabled=true]
    2011-04-01 11:58:17,507 [AWT-EventQueue-1] DEBUG MyKeyEventDispatcher.dispatchKeyEvent:48 - KEY3-CurrentFocusCycleRoot: javax.swing.JFrame[mainFrame,128,128,1024x768,invalid,layout=java.awt.BorderLayout,title=My - HQ - 17601,resizable,normal,defaultCloseOperation=DO_NOTHING_ON_CLOSE,rootPane=javax.swing.JRootPane[,0,0,1024x768,invalid,layout=com.ep.skin.lnf.framework.internal.RootPaneUI$MetalRootLayout,alignmentX=0.0,alignmentY=0.0,border=javax.swing.plaf.BorderUIResource@d0e678,flags=16777673,maximumSize=,minimumSize=,preferredSize=],rootPaneCheckingEnabled=true]
    2011-04-01 11:58:17,508 [AWT-EventQueue-1] DEBUG MyKeyEventDispatcher.dispatchKeyEvent:54 - KEY4-FocusedWindow: javax.swing.JFrame[mainFrame,128,128,1024x768,invalid,layout=java.awt.BorderLayout,title=My - HQ - 17601,resizable,normal,defaultCloseOperation=DO_NOTHING_ON_CLOSE,rootPane=javax.swing.JRootPane[,0,0,1024x768,invalid,layout=com.ep.skin.lnf.framework.internal.RootPaneUI$MetalRootLayout,alignmentX=0.0,alignmentY=0.0,border=javax.swing.plaf.BorderUIResource@d0e678,flags=16777673,maximumSize=,minimumSize=,preferredSize=],rootPaneCheckingEnabled=true]
    2011-04-01 11:58:17,509 [AWT-EventQueue-1] DEBUG MyKeyEventDispatcher.dispatchKeyEvent:60 - KEY5-FocusOwner: javax.swing.JTextField[,320,28,175x18,layout=javax.swing.plaf.basic.BasicTextUI$UpdateHandler,alignmentX=0.0,alignmentY=0.0,border=com.ep.skin.lnf.framework.utils.internal.RoundedBorder@c3a7c0,flags=296,maximumSize=,minimumSize=,preferredSize=,caretColor=sun.swing.PrintColorUIResource[r=51,g=51,b=51],disabledTextColor=sun.swing.PrintColorUIResource[r=51,g=51,b=51],editable=true,margin=javax.swing.plaf.InsetsUIResource[top=0,left=0,bottom=0,right=0],selectedTextColor=sun.swing.PrintColorUIResource[r=51,g=51,b=51],selectionColor=javax.swing.plaf.ColorUIResource[r=184,g=207,b=229],columns=15,columnWidth=11,command=,horizontalAlignment=LEADING]
    2011-04-01 11:58:17,510 [AWT-EventQueue-1] DEBUG MyKeyEventDispatcher.dispatchKeyEvent:66 - KEY6-PermanentFocusOwner: javax.swing.JTextField[,320,28,175x18,layout=javax.swing.plaf.basic.BasicTextUI$UpdateHandler,alignmentX=0.0,alignmentY=0.0,border=com.ep.skin.lnf.framework.utils.internal.RoundedBorder@c3a7c0,flags=296,maximumSize=,minimumSize=,preferredSize=,caretColor=sun.swing.PrintColorUIResource[r=51,g=51,b=51],disabledTextColor=sun.swing.PrintColorUIResource[r=51,g=51,b=51],editable=true,margin=javax.swing.plaf.InsetsUIResource[top=0,left=0,bottom=0,right=0],selectedTextColor=sun.swing.PrintColorUIResource[r=51,g=51,b=51],selectionColor=javax.swing.plaf.ColorUIResource[r=184,g=207,b=229],columns=15,columnWidth=11,command=,horizontalAlignment=LEADING]
    2011-04-01 11:58:17,512 [AWT-EventQueue-1] DEBUG MyKeyEventDispatcher.dispatchKeyEvent:74 - KEY7-stacktrace...
    com..client.util.MyKeyEventDispatcher$StackTraceGenerationException: This exception was created to generate a stack trace, and can be safely ignored.
         at com..client.util.MyKeyEventDispatcher.dispatchKeyEvent(MyKeyEventDispatcher.java:73)
         at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    The above log info repeats multiple times, KEY_PRESSED and KEY_RELEASE, over and over again, for 'escape' keys.
    Edited by: 850693 on Apr 7, 2011 10:16 AM (typo fix)
    Edited by: 850693 on Apr 7, 2011 10:19 AM (Fixed links)

    <discaimer>Don't put too much hope in my reply</disclaimer>
    The only real difference is QA has the Citrix client installed on them, and development does not. You don't need to run our Swing app through a Citrix client though to cause the bug/freezing, just running it on a PC with the Citrix client seems to be enough (in theory). We've been working down a checklist of possible problems/solutions, and we've gotten to the "Install Citrix to the dev PC" item now, so I'll post back if that makes a difference or not in reproducing the problem.
    I've also had QA people actually come over to a dev PC, without the Citrix client, and try to reproduce the problem, and they have not been able to. There's 'something' about their environment vs. ours, but not sure how that would manifest itself as a AWT/Swing keyboard event of mysterious escape keystrokes followed by the locking up on the keyboard, but not the whole Swing app. My personal guess is the Citirix client installing funky Windows-level keyboard driver(s), but I may be totally off on that. /shrugI read your initial post twice and couldn't find out whether you reproduce that on several different machines, so one "environmental" difference comes to mind: have you tried using another keyboard on the defective QA configuration?
    Of course that doesn't explain in itself how the problem would manifest only after switching back and forth to a native Windows app, but then, with the hint that Citrix may make a difference, maybe one driver filters out repeated "Esc" keystrokes, while another doesn't, and that manifests only after a few app switches, and the system event queue, or whatever it's called in Windows, redirects the events to the target app/window?
    Other than that, I wish you had investigated Jeanette's pacemaker hypothesis more... ;)
    Otherwise, yeah. I have a hook in to see all AWTEvent's, but I still need to see/find what's posting the mysterious escape keys to the event queue.I assume it's what you mean, but I'll try to make that clear: you have to investigate, at the OS level, what is posting escape key events to the OS queue.
    I am not a Windows developper, but I seem to understand that the following programs claims to capture keystrokes on the whole screen (not limited to a single window), with some limitations: http://www.codeproject.com/KB/winsdk/WIN_RECORDER.aspx
    More generally, you should search for a Windows way to peek at the Windows' (keyboard?) event queue.
    I'm not sure this could identify which DLL (if it's not originated by the material, see the defective keyboard hypothesis) is posting the events, but that's worth a try (Java for example, would enables to stuff a custom event queue that would trace info about a Java-poster).
    Even if you can't identify the posting DLL, running the "key captuyre" on both the Windows host that has the Citrix window, and the Windows host that you are accessing via Citrix, may give you hints as to where the heck the key strokes originate...
    Good luck, and keep us informed,
    J.

  • ServiceLocator for swing app

    can anyone show me way how to speedup ejb invocation from remote swing app?
    I read about servicelocator for jsp application, but can no find topic about remote swing app servicelocator.
    my network call to remote ejb methods is dramatically slow :(
    thanks !

    Yes, good question, on my remote app it is very slow too....

  • Completed all Troubleshooting steps but continue to get slow downs from unresponsive scripts on Firefox. Is there a way to use my browser w/out slow downs?

    Mac OSX.
    I've gone through the list of troubleshooting tips for slow downs and for unresponsive scripts. I continue to get slow downs to my computer and browser when I use my Firefox. It is becoming so bad that sometimes I cannot get work done.

    And now, I think I've identified part of the issue. When you pin tabs as an app tab, this slows down Firefox in all the ways I mentioned. Please, please Firefox, if you are going to offer such a useful and simple thing, make sure that it works...
    Having closed these App Tabs, I had a temporary break from the slow downs... Then after another few minutes, the slow downs in Firefox continued... At my wits end.

  • Why AWT apps are faster than Swing apps?

    I have written applications using both AWT and Swing. While running under Windows, I feel that AWT apps are much faster and smoother. In contrast, Swing apps fare terribly. Regardless, I can not go back to AWT because of thier limited capabilities.
    I love Java APIs, it is great for programmer. But what about the consumers? Consumers do not care whether it is written in Java or Visual C++?
    I am having a mid-"programming" crisis. I do not want to but, but would be forced to use VC++ for desktop apps abandoning Java.
    I would like to know if you are a serious desktop programmers, what is your motivation for using Java, not VC++ or something?
    Thanks.

    well, for me, it's that one it's Platform Independent. and that does come in handy when your work uses macs instead of normal PCs. Second, it's free to use, unlike VC++ and Pseudo Code (Visual Basic), you don't have to pay unbeleivably large sums of money to get a good compiler. And then there's the whole "Swings Apps are Slower", yes they are, however, if you program them write, they only take a while to initialize, once that is done they run as fast as any Native Program unless you have a tremendous amount of calculations and dynamic generation of components. And also the no Excecutables, true, and... not true, creating a Jar File is almost the same as making a making an EXE, only Jar Files are... platform independent.... and unlike C++ which gives you enough rope to run around the world three times, jump over the moon and hang yourself for actually using it, Java is a clean programming language, not a whole lot of those nasty characters and styles that ugly up your code. at least these are the reasons why i pick Java as the language to come out on top of all others.

  • How to create printable report from a swing app.

    Hi,
    I have googled quite a bit and have searched the forum extensively but haven't found answers to my questions.
    I have a small swing based application (that uses jtextfields, jbuttons, jlist, etc) that collects information from user
    and stores in some variables; which are like strings, integers, hashmap, etc.
    Now this information is to be formatted and is to be printed as a report.
    Formatted as in, some part of the collected text is to be printed in certain font and other in different color and so on.
    Also the report is to be printed on a paper leaving some space at left and at the top. That means margins need to be set.
    And before all info is to be sent to printer I need to display this information in some report viewer (preview).
    How can I format certain text and set margins? (Is there some Document kind of api which allows me to set margins, change font of certain text?)
    How should I display this text / information as a print preview? (Should I use jeditorpane / jtextpane ?)
    How should I send all the information to the printer? (What java api should be used for printing?)
    The data entered by the user is not saved / persisted to any database. It's to be sent to the printer after submit button is pressed on the swing app.
    Since there is no database I couldn't use jasper-reports.
    Following are links to all threads (not useful) I found when I searched for swing / print / report in the forum :
    http://forums.sun.com/thread.jspa?forumID=331&threadID=225351
    http://forums.sun.com/thread.jspa?forumID=57&threadID=576758
    http://forums.sun.com/thread.jspa?forumID=57&threadID=570629
    http://forums.sun.com/thread.jspa?forumID=1&threadID=489905
    http://forums.sun.com/thread.jspa?forumID=57&threadID=571093
    http://forums.sun.com/thread.jspa?forumID=257&threadID=138450
    http://forums.sun.com/thread.jspa?forumID=57&threadID=583150
    http://forums.sun.com/thread.jspa?forumID=57&threadID=5399572
    http://forums.sun.com/thread.jspa?forumID=57&threadID=579619
    http://forums.sun.com/thread.jspa?forumID=57&threadID=593199
    Help would be much appreciated.

    alan_mehio wrote:
    The simplest thing to do in your case is to load the file content into the JTextArea
    then to create the header and the footer if there is any from java.text.MessageFormat
    then you invoke the print method on the JTextArea instance object> Just let me know if you are face any furrher problem
    Alan Mehio,
    I have been able to set margins and get the printout just the way I want it (after some experiments / trial & error).
    But the problem is, parameters to paper.setImageableArea() are hard coded as in the example code below :
            System.out.println("print?");
            PrinterJob printJob = PrinterJob.getPrinterJob();
            if (printJob.printDialog()) {
                PageFormat pf = printJob.defaultPage();
                Paper paper = pf.getPaper();
                paper.setSize(8.5 * 72, 11 * 72);
                System.out.println("paper width : " + paper.getWidth());// expecting 612
                System.out.println("paper height : " + paper.getHeight());// expecting 792
                System.out.println("ImageableHeight : " + paper.getImageableHeight());
                System.out.println("imageable width : " + paper.getImageableWidth());
                System.out.println("ImageableX : " + paper.getImageableX());
                System.out.println("Imageable y : " + paper.getImageableY());
                //paper.setImageableArea(108, 144, paper.getWidth() - 108, paper.getHeight() - 144);
                paper.setImageableArea(222, 244, paper.getWidth() - 222, paper.getHeight() - 244);
                pf.setPaper(paper);
                printJob.setPrintable(jTextArea1.getPrintable(null, null), pf);
                try {
                    printJob.print();
                } catch (Exception ex) {
                    System.out.println("exception while printing...");
                    ex.printStackTrace();
            }In my case the left margin should be 1.5 inches (38.1mm) and top margin should be 2 inches (50.8 mm)
    Considering 72dpi printer for a A4 size page (8.5in X 11in), the parameters to paper.setImageableArea() should be
    (108, 144, paper.getWidth() - 108, paper.getHeight() - 144);
    But the printout leaves only 1inch for top and left margins.
    Here are o/p lines for method-call with above said params :
    paper width : 612.0
    paper height : 792.0
    ImageableHeight : 648.0
    imageable width : 468.0
    ImageableX : 72.0
    Imageable y : 72.0
    When I pass the following values I get text printed with desired margins on the paper but the above printlns remain exactly the same!
    paper.setImageableArea(222.4, 244, paper.getWidth() - 222.4, paper.getHeight() - 244);
    Although I have been able to achieve what I wanted to without using 3rd party libraries,
    I feel this hard coding of values isn't a good idea and leaves a doubt whether this will work on other systems with different printers.
    My question is, how to get these numbers correct every time? Is there a formula for obtaining these numbers?
    Also formatting of certain part of to-print text is something that is yet to be figured out.
    Thanks.

  • Keyboard Problem while running Swing App on LINUX

    Hi All,
    We have a Swing based Application running on Windows Platform. We need to run the Application on LINUX. The Application does not have any problem and runs without problems for a few minutes but after that the keyboard stops to respond inside the application. Keyboard runs fine outside the application but no key events are recognized inside the application. Mouse is working fine even after the keyboard stops responding.
    Key Points:
    �     The keyboard is a PS/2 keyboard.
    �     Read Hat Fedora 5.0 is being used.
    �     The problems occur on both KDE and GNONE.
    �     The Java Version is jdk1.5.0_09
    The application is data entry application using EJB at server side. The client UI has lot of JTables and Desktop Panes/ Internal Frames. User use ctrl+tab, ctrl+shift+tab, tab, shift+tab, and other hot keys to navigate between Components. Listeners on keyboard Focus Owner are also used. We are unable to diagnose the problem because of the undeterminable nature of the problem. The problem occurs at anytime and does not occur on any special key/ combinations press.
    Thanks and Regards,
    Nishant Saini
    http://www.simplyjava.com

    I've just installed the JDK 1.4 on my debian box. I
    can compile and run a basic Hello World app using
    System.println, but when I try to run a simple swing
    app, I get an error like:
    Exception in thread "main"
    java.lang.NoClassDefFoundError
    at java.lang.Class.forName0(Native Method)
    at java.lang.... etc, etc.
    It goes on with about 30 different classes. It
    compiles fine, with no errors, but when it comes time
    to run, that's what I get. This is what I have in my
    .bash_profile as far as environment variables go:
    export JAVA_HOME="/usr/local/j2sdk1.4.1_01"
    export PATH="$JAVA_HOME/BIN:$PATH"
    export
    CLASSPATH="$JAVA_HOME/jre/lib/:$JAVA_HOME/lib:."The code works fine in Windows, so unless there's
    something platform-specific, I don't think there's a
    problem there. I've checked to make sure I'm not
    running kaffe by accident and I'm definitely running
    the right java and javac. I'm out of ideas. Any
    suggestions would be greatly appreciated.
    -dudley
    I may just be crazy, but your PATH looks a little screwy to me. I was under the impression that the standard java installation has its executables in the 'bin' directory, not the 'BIN' directory. Unless Debian has fallen to the evil empire, then I'm fairly sure file names are case-sensitive. I don't know if that will fix your problem though. Do you compile from the command line, or do you use an IDE???

  • Mail app itself stutters and is very slow.

    I installed Lion today with little problems until now.  My Mail app (v 5.1) is excruciatingly slow.  Scrolling up and down the list of emails shows to have a 1 to 3 second delay.  If I closed out of the app and went back in to it, it would take minutes for the app to load and be functional.  Emails get drafted and mailed with ease, but it's the function of the app that is currently the problem.  I've checked things like clearing the cache, having all other app's closed, etc. and still nothing. My Safari works just fine - quick as ever and even over Airport.  I can only guess there is something amiss between iCloud and Lion.
    Thanks for any help or empathy out there!

    What’s the capacity and space available on the startup disk?
    Verify/repair the startup disk (not just permissions), as described here:
    The Repair functions of Disk Utility: what's it all about?
    Now, go to Apple Menu > System Preferences > Network > Show: Network Port Configurations, and make sure that the configuration used to connect to Internet appears at the top of the list.
    Finally, try launching Mail with no Internet connection. Does Mail work properly while offline?

  • Running java swing apps thru telnet... [Is this possible?]

    Hi All!
    I am just wandering if it is possible to run swing applications thru telnet since everytime I run it... it returns ang error....
    Exception in thread "main" java.lang.NoClassDefFoundError: sun/awt/X11GraphicsEnvironment
    at java.lang.Class.forName1(Native Method)
    at java.lang.Class.forName(Class.java:173)
    at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:90)
    at at sun.awt.motif.MToolkit.<clinit>(MToolkit.java:109).null(Unknown Source)
    at java.lang.Class.forName1(Native Method)
    at java.lang.Class.forName(Class.java:173)
    at java.awt.Toolkit$2.run(Toolkit.java:754)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:745)
    at javax.swing.ImageIcon.<init>(ImageIcon.java:226)
    at javax.swing.LookAndFeel$1.createValue(LookAndFeel.java:295)
    at javax.swing.UIDefaults.getFromHashtable(UIDefaults.java:203)
    at javax.swing.UIDefaults.get(UIDefaults.java:148)
    at javax.swing.MultiUIDefaults.get(MultiUIDefaults.java:65)
    at javax.swing.UIDefaults.getIcon(UIDefaults.java:429)
    at javax.swing.UIManager.getIcon(UIManager.java:562)
    at javax.swing.plaf.basic.BasicOptionPaneUI.getIconForType(BasicOptionPaneUI.java:600)
    at javax.swing.plaf.basic.BasicOptionPaneUI.getIcon(BasicOptionPaneUI.java:586)
    at javax.swing.plaf.basic.BasicOptionPaneUI.createMessageArea(BasicOptionPaneUI.java:337)
    at javax.swing.plaf.basic.BasicOptionPaneUI.installComponents(BasicOptionPaneUI.java:178)
    at javax.swing.plaf.basic.BasicOptionPaneUI.installUI(BasicOptionPaneUI.java:146)
    at javax.swing.JComponent.setUI(JComponent.java:475)
    at javax.swing.JOptionPane.setUI(JOptionPane.java:1725)
    at javax.swing.JOptionPane.updateUI(JOptionPane.java:1747)
    at javax.swing.JOptionPane.<init>(JOptionPane.java:1710)
    at javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:832)
    at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:646)
    at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:617)
    at JTest.main(JTest.java:40)
    Source Code:
    import javax.swing.*;
    import java.awt.*;
    public class JTest extends JFrame{
    JPanel pnlMain = new JPanel();
    JLabel lblMsg=new JLabel("This is only a test.");
    Font font=new Font("Arial", Font.BOLD, 28);
    public JTest(){
    try{
    this.setTitle("Unix Frame Testing");
    this.setBounds(10,10,500,100);
    this.setVisible(true);
    this.setDefaultCloseOperation(this.EXIT_ON_CLOSE);
    lblMsg.setFont(font);
    lblMsg.setBounds(100,10,250,50);                    
    pnlMain.setLayout(null);
    pnlMain.add(lblMsg);
    this.setContentPane(pnlMain);
    }catch(Exception e)
    { System.out.println("Unable to Display Window.");
    JOptionPane.showMessageDialog(null,"Unable to Display Window.","Error",JOptionPane.INFORMATION_MESSAGE);
    System.exit(0);
    public static void main(String args[]){
    JTest test=new JTest();
    }

    "scripts" are entirely different from GUI applications. What do you expect to happen when you run a Swing application through telnet on another machine? Do you expect the Swing UI to be magically transported to the local Windows machine?
    Not gonna happen. Yes, like ejp hinted, you could run an X-environment on your local machine and have the Swing UI tunnel its output there, but are you sure you want GUI apps to run on a remote machine like that? It's not gonna be fun to work with, I'll tell you that.
    Why not create a Java WebStart app (or perhaps even an applet) out of your application, so your users can run the application locally?

  • Launching Swing apps in foreground remotely

    We have an agent that runs on our machines waiting to start and stop java applications, but there is a problem when the application has a GUI element to it. We are using the RunTime classes and it executes applications in the background which means that GUIs cannot be seen even though they are running.
    What is the secret to automatically launching java swing apps in the foreground?
    Thanks in advance.

    Replying to myself, as I think I've just found the answer (at least for an windows environment)
    --> Just start your app with "javaw" instead of "java"
    (What would be the right way to do it in Linux, for instance?)
    Joao Clemente

Maybe you are looking for