alternative to CardLayout

Hello I’m new to the forum… Anyway I have been told that swing is pretty useless in active rendering (because of the EDT i guess?), so I am curious what a good alternative to CardLayout is? Ty for any and all help.

Why are you using CardLayout for active rendering? ???

OpenGL (LWJGL or JOGL) is probably what you’re looking for. There are libraries like LibGDX and Slick to help minimize the GL setup.

dang that sucks… I didn’t want to have to learn openGL (basics or otherwise) for a while, but the reason I figured you would need it for active rendering, is because you would have multiple screens (start screens, loading screen maby, game screen, and anything in between). Whenever I had used the remove() method in the past (to remove buttons or labels), it would just close the frame or remove the object and leave behind its face (it would look like the button is there, but it doesn’t respond to clicks or anything).

If the choice is learning Swing or learning OpenGL - learn OpenGL. It’s less crazy.

really? I had allways assumed openGL was something like win32, which I guess isn’t that bad, but the use of bitwise operators usually throw me off. Not over what they do, but the overall logic of it.

What bitwise operations? :wink:

Arguably a hammer is easier to use than a screwdriver, but have you ever tried to hammer in a screw?

I’d agree it is a little… off your usual Java libraries.

Why don’t you take a look at Slick2D? That is OpenGL under a Java2D-like, surface.

Maybe:

glClear(GL_COLORBUFFER_BIT | GL_DEPTHBUFFER_BIT);

Anyway, there are very little binary operations in OpenGL, except when you work with the stencil buffer.

Well I meant more on custom numbers, not those flags. :stuck_out_tongue:

It’s about what PRW56 meant.