swing

"Always on Top" Windows with Java

In Java, is there a way to have a window that is "Always on top" regardless if the user switches focus to another application? I've searched the web, and all of the solutions lean to some sort of JNI interface with native bindings. Truly this can't be the only way to do it?.. or is it? ...

Changing java lookandfeel without modifying the application

Is it possible to change java lookandfeel without modifying the program in a real-world environment? I know that theoretically the answer is yes. I also created demo applications and changed the lookandfeel even at runtime and it worked. But when I created a real application with lots of controls lookandfeel change was not really workin...

Java Swing: how to add an image to a JPanel ?

I have a JPanel to which I'd like to add JPEG and PNG images that I generate on the fly. All the examples I've seen so far in the Swing Tutorials, specially in the Swing examples use ImageIcons. I'm generating these images as byte arrays, and they are usually larger than the common icon they use in the examples, at 640x480. Is there ...

How do you make a Swing/JFace/SWT GUI addressable?

I have a "fat" GUI that it getting fairly complex, and I would like to add links from a place to an other, and add back/forward buttons to ease navigation. It seems to me that this would be easier if my application was addressable: each composite could have its URI, and links would use that URI. Are there design patterns applicable to t...

Changing NetBeans UI Look/Feel

Is it possible to somehow change the look/feel of NetBeans? I know it uses Swing and that usually apps using Swing for its UI can usually have their UI scheme changed. The default appearence for OSX is vomitastic and would even settle for just some sort of barebones "default" look. The whole look is just too distracting and unnecessary....

Swing app global modal.

Simple question: Can a swing frame be completely modal ( block all others windows ) ? I tried the following, but I can still click on other apps windows ( like this browser ) JDialog myDialog = .... myDialog.setModalityType(Dialog.ModalityType.APPLICATION_MODAL); Plase paste some code if this is possible. Thanks in advance. U...

How can I validate parameters without creating a separate dialog?

I'm going to make an application (in Swing) that uses a tree to visualize a data structure (JTree). A tree will be on the left side of a window. The user will be able to browse a tree. The parameters of every tree node will be displayed on the right side of the window. The example windows will be looking like this ===================...

Is there a free (LGPL, BSD, etc) implementation of XML editor swing component.

I need a JComponent thad enables editing xml documents so I can embed it in my application. It doesnt need to bee fancy. Plain text editing and highlighting would bee enough. Thank in advance ...

Is there a free (LGPL< BSD, etc. ) RDF editor component for swing ?

I look for a JComponenet based RDF editor which I could embed in my application? It does'n need to be fancy . Thanks in advance. ...

What are good docking frameworks for Java/Swing?

I'm looking for a good lightweight Java docking framework. I know that Netbeans and Eclipse can be used as RCP, but I'm looking for something a little bit more lightweight. ...

How to disable a container and its children in Swing

I cannot figure out a way to disable a container AND its children in Swing. Is Swing really missing this basic feature? If I do setEnabled(false) on a container, its children are still enabled. My GUI structure is pretty complex, and doing a traversion of all elements below the container is not an option. Neither is a GlassPane on top ...

Native Swing Menu Bar Support For MacOS X In Java

A link that stands out is http://www.devdaily.com/blog/post/jfc-swing/handling-main-mac-menu-in-swing-application/ however the menu bar under Mac OS X displays as the package name as opposed to the application name. I'm using the code in the above link without any luck, so I'm unsure if anything's changed in recent Mac OS versions. Her...

Visual inheritance in Java

The team in which I work has been getting problems with the visual inheritance of the forms in the Java platform. We want to develop a base JFrame with some controls in it and to have inherited forms from that base JFrame. The designer of the Netbeans 6.1 does not paint the controls of the base form in the inherited ones, so we can´t us...

Howto bring a Java window to the front?

We have a Java-application that needs to be brought to the foreground when a telecontrol mechanism activates something in the application. In order to get this we have realised in the called method of the Class which represents the Frame of our application (extension of a JFrame) following implementation: setVisible(true); toFront(); ...

Embedding an application inside another application

I'm sure some of you noticed that if you have Acrobat Reader ( or any other pdf viewer ) , and open a pdf in Firefox , you will see it embedded inside your tab . Is there any way to embed an application in a JFrame ? ...

How can I make a swing JButton repeat its action when it is held down?

I am creating an touch screen application using Swing and have a request to change one of buttons so that it will behave like a keyboard when the button is held down. (First of all, I am not sure that the touch screen will allow the user to "hold down" the button, but pretend that they can for now) I was going to go down the path of sta...

JButton expanding to take up entire frame/container

Hey everyone. I'm trying to make a swing GUI with a button and a label on it. im using a border layout and the label ( in the north field ) shows up fine, but the button takes up the rest of the frame (it's in the center field). any idea how to fix this? ...

How could I allow only unique strings in a JList ?

I have a JList that holds a bunch of strings . I would like it to act like a Set , so that it will only hold unique values . Is there any way to achieve this without checking that a new string doesn't already exist there ? ...

Custom Cursor in a Swing JDialog

I have a Java Swing application, developed on Mac OS X 10.5 using Java 1.5. I'm trying to make a custom cursor appear when the user moves the mouse over some text in a dialog. The cursor never changes, though. When I don't use a JFrame instead of a JDialog, the cursor does change. But then I'll have to write all the dialog code myself...

Can you set a permanent size for a JPanel inside of a JFrame?

Hey everyone, My current problem is that I have a JFrame with a 2x2 GridLayout. And inside one of the squares, I have a JPanel that is to display a grid. I am having a field day with the java swing library... take a look http://img114.imageshack.us/img114/9683/frameow2.jpg Java is automatically expanding each JLabel to fit the screen....