The Artima Developer Community
Sponsored Link

Java Buzz Forum
No Large Images Allowed In SWT

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Scott Delap

Posts: 1154
Nickname: scottdelap
Registered: Sep, 2004

Client / Server application developer.
No Large Images Allowed In SWT Posted: Nov 12, 2004 8:21 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Scott Delap.
Original Post: No Large Images Allowed In SWT
Feed Title: ClientJava.com
Feed URL: http://www.clientjava.com/archives/wireless_mobile.rdf
Feed Description: Client/Desktop Related Java Development
Latest Java Buzz Posts
Latest Java Buzz Posts by Scott Delap
Latest Posts From ClientJava.com

Advertisement

I spent a good portion of yesterday tracking down why this code doesn't work:

    Display display = Display.getDefault();
    Image image = new Image(display, 10000, 4400);
    GC graphicContext = new GC(image);
    
It results in the following error:

    org.eclipse.swt.SWTError: No more handles
    	at org.eclipse.swt.SWT.error(SWT.java:2717)
    	at org.eclipse.swt.graphics.Image.init(Image.java:1366)
    	at org.eclipse.swt.graphics.Image.(Image.java:161)
    	at com.clientjava.SampleTable.main(SampleTable.java:9)
    
This is one of the more useful errors I have ever seen =). Upon doing a little investigation, I found a little more to work with. It turns out the Image constructor ultimately makes an os call:
    OS.CreateCompatibleBitmap(hDC, width, height);
    

According to Microsoft this bitmap can be a maximum of 16M on Windows 95/98/Me. It says nothing about Windows 2000 or XP. However, there has to be a limit because I've found it. The Eclipse mailing lists seems to be little help as well.

SWT No more handles error with nVidia Quadro 5.3.0.3 video driver

Re: org.eclipse.swt.SWTError: No more handles

So the question of the day is how do you work around this issue?

Read: No Large Images Allowed In SWT

Topic: [Nov 2, 2004 04:15 PST] 13 Links Previous Topic   Next Topic Topic: Where are all the J2EE 1.4 implementations?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use