Jump to content
skaterdav85

Lightbox modal window in java?

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 =/

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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?

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

interesting. The JavaFX examples seems like better looking applets. Flash/Flex seem better though for web apps and desktop apps

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...