• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

error in Swing based app when accessing via Xmanager

 
Ranch Hand
Posts: 42
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have a swing based java application

I am accessing through Xmanager from Linux box ,when I open some window in the application by clicking on some button , this error prints in console..and window opens up ..(shows wrong data coz of Exception)

Exception in thread \"AWT-EventQueue-0\" java.lang.IllegalArgumentException: Width (0) and height (0) cannot be <= 0
"ERROR", "0", "11", at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:99

but when I double click once again on the button from which window was opened , there will be no exception
and the window shows correct data..

I have tried the following by adding into /etc/profile file.....but no gain.

# Start the X virtual frame buffer (Xvfb)
if [ -f /usr/X11R6/bin/Xvfb ]; then
/usr/X11R6/bin/Xvfb :1 -screen 0 1024x768x16
fi

can anyone please tell me why does this behaviour

Thanks in advace

 
Bartender
Posts: 4179
22
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is a rather naive suggestion, since I don't know anything about your code or Xmanager, or Java on Linux but...

It seems to be complaining about a 0 sized window. Can you set the width and height of the frame before you show it?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic