Re: JTabbedPane Canvas3D bug
Posted by Julien on Dec 20, 2013; 6:19pm
URL: https://forum.jogamp.org/JTabbedPane-Canvas3D-bug-tp4030983p4031010.html
Sven and Julien,
Thanks for looking into this. I downloaded the latest nightly autobuild (version=2.1.4-rc-20131219). (This project has nice continuous integration, BTW. Nice work). I note that the "stuck" image problem I describe above is fixed, but I encountered another problem. The code I submit here is almost the same as the code sample above, but the constructor is slightly different. In particular, the layout is changing from BorderLayout to BoxLayout for tab 1 and 2. Now after switching back and forth between tabs, the image eventually disappears on the second tab. (I had actually noticed this same problem in an earlier version of jogamp). This example works on Java 3D 1.5 / Java 6 / OS X.
public Bug() {
super(new GridLayout(1, 1));
JTabbedPane tabbedPane = new JTabbedPane();
JPanel jp1 = new JPanel();
jp1.setLayout(new BorderLayout());
jp1.add(canvas3d(1.0f, 1.0f, 1.0f));
JPanel jp2 = new JPanel();
jp2.setLayout(new BoxLayout(jp2, BoxLayout.X_AXIS));
jp2.add(canvas3d(1.0f, 1.0f, 1.0f));
tabbedPane.addTab("Tab 1", jp1);
tabbedPane.addTab("Tab 2", jp2);
add(tabbedPane);
}
Thanks again.
-Julien