Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

11991 Posts in 1587 Topics- by 3509 Members - Latest Member: lioneltenel

26. May 2012, 09:41:22 pm
Xith3D CommunityGeneral CategorySupport (Moderator: Marvin Fröhlich)Problems with Xith an Swing
Pages: [1]
Print
Author Topic: Problems with Xith an Swing  (Read 1500 times)
Alex
Just dropped in

Offline Offline

Posts: 5


View Profile
« on: 17. December 2006, 10:57:29 pm »

Hi its me again (The blind one  Cheesy)

I started with my project (clicked a SWING-GUI with VEP and tried to test Canvas3dPanel) and got some problems. I thought VEP made some problems, but after this code don´t work too, I think I don´t understand something.

Code:
import java.awt.GridLayout;
import javax.swing.JFrame;
import javax.swing.JPanel;

import org.xith3d.render.canvas.Canvas3DPanel;


public class Main {

/**
* @param args
*/
public static void main(String[] args) {
JFrame f = new JFrame("sdfsdfsdf");
f.setLayout(new GridLayout(1, 1));
//JPanel c3dp = new JPanel();
Canvas3DPanel c3dp = new Canvas3DPanel(); // there are other constructors that could be interesting, too.
f.getContentPane().add(c3dp, null);

f.setVisible(true);
}
}


Errormsgs:
Exception in thread "main" java.lang.UnsupportedOperationException: You cannot change the LayoutManager of a Canvas3DPanel.
   at org.xith3d.render.canvas.Canvas3DPanel.setLayout(Canvas3DPanel.java:80)
   at java.awt.Panel.<init>(Unknown Source)
   at java.awt.Panel.<init>(Unknown Source)
   at org.xith3d.render.canvas.Canvas3DPanel.<init>(Canvas3DPanel.java:205)
   at org.xith3d.render.canvas.Canvas3DPanel.<init>(Canvas3DPanel.java:222)
   at org.xith3d.render.canvas.Canvas3DPanel.<init>(Canvas3DPanel.java:230)
   at main.Main.main(Main.java:19)

 
Why it doesn´t work? I change the layout only one time (f.setlayout....)

Cu Alex
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #1 on: 17. December 2006, 11:12:56 pm »

Damn. My fault. Thanks for the hint.

It's fixed. Please recheckout.

Marvin
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic