|
| ||||||||||
| Tags: canvas, java, java awt, java swing, jsplitpane |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| Canvas inside JSplitPane
One more thing: under construction of GUI Canvas.setPreferredSize, I have called for making one's calling pack () performed on the final JFrame bring me to the Canvas to a minimum. In other words I wish that when the application is the Canvas had a certain size, but also that the user is able to raise the splitter and to shrink the JFrame. |
|
#2
| |||
| |||
| Re: Canvas inside JSplitPane
Look, if I remember correctly was discouraged by the sun itself using AWT and Swing components together. And among other things by now you should only use swing. Why did you need this? |
|
#3
| |||
| |||
| Re: Canvas inside JSplitPane
Because in reality it is not exactly a canvas but a GLCanvas of JOGL (which inherits Canvas). I know that there is also GLJPanel JOGL, but instead is discouraged by the team of JOGL because it is less helpful So if I can make my GUI with GLCanvas. This should be the last problem left: in addition to this I had only problem with the fact that the Canvas is heavyweight and hide the menu. |
|
#4
| |||
| |||
| Re: Canvas inside JSplitPane Quote:
I ask because years ago to build a viewer for 3D models for CAM software we had the same necessity for performance reasons. Then later, when the JOGL have become "more mature" in parallel to improvements on Swing side, we could upgrade to JPanel with no loss of performance (of course then it depends on what you have to render). So if I were you then I would have first tried with GLJPanel, and then only after having seen the actual loss of performance (and has verified with a profile which is the actual bottleneck, another lesson learned on my skin) as surely attributable to the GLJPanel replacing it with GLCanvas. In the latter case, you must devise some strategy to integrate it into IU minimizing interoperability problems that occur when you mix AWT components with Swing components. |
|
#5
| |||
| |||
| Re: Canvas inside JSplitPane
After reading the various guides, I see that now the situation has improved, but the performances are still comparable. The reason is that JPanel (which inherits GLJPanel) is a lightweight component and as such has a native window (typically in the native environment to do rendering with OpenGL is a window dedicated to native on which we can do just that and we can not render nothing else), and if we add a JPanel that should also optionally be made partially transparent, the most reasonable solution for the JOGL team was that when drawing on a GLJPanel no designs on screen but will grab the contents of frame buffer with glReadPixels or similar and that content is then rendered on GLJPanel with any semi-transparent. This solution perfectly reasonable, is inherently less performing the operation of a Canvas, as it can optimize. |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "Canvas inside JSplitPane" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Canvas HD A116 vs Canvas 2 A110 vs Infinity A80 | Rajminder | Polls & Voting | 4 | 29-03-2013 01:05 PM |
| Micromax A110 Canvas 2 with GTA 3 | Tusharr | Portable Devices | 9 | 16-03-2013 10:42 AM |
| How to add image inside the canvas using SilverLight | Hunter-Man | Windows Software | 3 | 17-04-2011 06:51 PM |
| How to use <canvas> tag in HTML5 | Aia Zav | Software Development | 7 | 26-02-2011 12:52 PM |
| JSplitPane class of java | Owen Fernandes | Software Development | 5 | 15-02-2010 07:44 AM |