Jump to content

Lightbox modal window in java?


skaterdav85

Recommended Posts

Does anyone know of a nice looking Java dialog box similar to the Javascript Lightbox, or does this not exist? As I am creating a java applet, I'm noticing how much harder it is to create a GUI in Java than in html/css =/

Link to comment
Share on other sites

Which Windowing toolkit are you using? To get a modal Windows in Swing, you can use javax.swing.JDialog, and in the SWT (which I recommend over Swing), you just use java.awt.Dialog with the modal argument set to true in the constructor.Edit: Scratch that, I didn't see the "applet" bit.

Link to comment
Share on other sites

Currently I'm using all swing components so for my dialog I am using JOptionPane, which looks just like a JS alert box, but I wanted something prettier if it exists. What would you recommend? I heard that mixing other components with Swing can get buggy.

Link to comment
Share on other sites

Well, Swing was created for desktop UIs, so its window design reflects current trends in said UI design. Java wasn't really made for making pretty designs.Theoretically you can actually create your own Swing themes, though. http://java.sun.com/products/jfc/tsc/articles/sce/index.html

Link to comment
Share on other sites

it seems like the L&F can be controlled by adding additional jar files? Is this like adding additional an stylesheet to your web app? Is there a place where you can download swing themes from? I googled it and found various swing themes but I couldn't find where to download anything.

Link to comment
Share on other sites

The Java tutorials has a page on look and feel modifications Look and Feel. But I think JavaFx might be a better go for applet ui as it looks a lot better than swing . I use that version of sap on the link Snyook posted and the look of sap hasn't really changed much since the java update if at all.

Link to comment
Share on other sites

interesting to know. I am making an applet because I took a class on Java and this is our final project. I could have whipped out something much better looking in JavaScript though. What is JavaFX exactly anyways?

Link to comment
Share on other sites

JavaFx as I read before release, is Sun's answer to flash and current use of Javascript, Jquery libraries etc. I was reading some source code today and its like a scripting language built on java. You can use java code in the scripts but it requires a browser update to run just like flash and Microsoft silver light. The content it can generate looks pretty neat :JavaFX. But java is interpreted so its a bit slow so technology built on that should be slower right?

Link to comment
Share on other sites

  • 2 weeks later...
interesting. The JavaFX examples seems like better looking applets. Flash/Flex seem better though for web apps and desktop apps
Well if you are talking web apps Java Fx is nowhere ready for flash yet. I didn't realize that it doesn't run in a web page but rather in a separate container.
Link to comment
Share on other sites

  • 4 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...