NewtCanvasAWT Questions

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

NewtCanvasAWT Questions

William Bittle
Just a few questions about the NewtCanvasAWT class.

I've been having some threading issues using Swing and GLCanvas as described on the jogamp site.  So I decided to bite the bullet and move to NEWT, specifically using the NewtCanvasAWT class (which wasn't that bad).

On to the questions:
1. Is the NewtCanvasAWT intended for the purpose of having NEWT performance while retaining the UI components of AWT/Swing?  (This is the case from what I understand).  Is this a temporary compatibility layer?  What are the downsides of this vs. GLCanvas?
2.  Having already tried this (with great results as far as the threading issue), I do have one issue.  When the user clicks the GL rendered area and holds the button, the mouse cursor is changed via NewtCanvasAWT.setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR)).  This works well, however, as the mouse is moved the cursor flickers back and forth between the MOVE_CURSOR and the default cursor.  It does not flicker while stationary.  Here is an extremely poor quality video illustrating the problem: Cursor Problem
3.  I'm getting "Detected screen size 1280x1024" printed to the console.  Is there anyway to stop this?  Not sure where its coming from, but it only showed up after I started using GLWindow/NewtCanvasAWT.

Thanks William
Reply | Threaded
Open this post in threaded view
|

Re: NewtCanvasAWT Questions

William Bittle
Just an update:

1. ?

2. This is a problem and you can view it in the latest release of my test app here.  Click and hold the left mouse button (in the white area on the right) and drag the mouse, the cursor should change but will flicker when moved.

3. I upgraded to latest release version and this is no longer a problem.

Thanks,
William
Reply | Threaded
Open this post in threaded view
|

Re: NewtCanvasAWT Questions

gouessej
Administrator
Hi

Please provide a small test case for your second problem and report a bug.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: NewtCanvasAWT Questions

William Bittle
I opened a bug.  Let me know if you need more information or I'm not clear in my description.
Reply | Threaded
Open this post in threaded view
|

Re: NewtCanvasAWT Questions

gouessej
Administrator
Thank you for your bug report with a pertinent test case.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: NewtCanvasAWT Questions

gouessej
Administrator
In reply to this post by William Bittle
I don't reproduce your bug, I'm under GNU Linux, Mageia Linux 1, OpenJDK 1.6. The tooltips are not displayed correctly, I only see gray rectangles.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: NewtCanvasAWT Questions

jouvieje
I've not tried the test case, but on windows 7 64bit NewtCanvasAWT.setCursor is not working properly for my application too. The behavior I have seem similar to the one reported here.

In my application, once the mouse is moved after NewtCanvasAWT.setCursor has been call, then the cursor set is lost and default cursor is shown instead. It works well if I use GLCanvas.

I using jogl RC8.
Jérôme
Reply | Threaded
Open this post in threaded view
|

Re: NewtCanvasAWT Questions

William Bittle
In reply to this post by gouessej
@gouessej
When you say the tooltips, I guess you are referring to the Sandbox app that I posted a link to?  If so, can you change the look and feel in the menus (Window->Look and Feel->Metal) and see if you see the tooltips?

I'm using:
ToolTipManager.sharedInstance().setLightWeightPopupEnabled(false);
JPopupMenu.setDefaultLightWeightPopupEnabled(false);
to allow the tooltips to display over the canvas.

@jouvieje
The behavior you describe is what I found to be happening in my application as well.  However, I also have a swing Timer that I use to update some JTextFields.  The Timer adds the flicker.