swingx

Swing vs JavaFx for desktop applications [closed]

ぃ、小莉子 提交于 2019-11-27 02:23:13
I have a very big program that is currently using SWT. The program can be run on both Windows, Mac and Linux, and it is a big desktop application with many elements. Now SWT being somewhat old I would like to switch to either Swing or JavaFX. And I would like to hear your thoughts on three things. My main concern is what will be better for a desktop GUI application? (I looked online and a lot of people suggest that JavaFX is just as good as Swing, but I didn't see many valid arguments except simple opinion flame wars). It has to work on both Windows, Mac and some popular Linux distributions.

create an transparent rectangle over blurred background in jframe

十年热恋 提交于 2019-11-26 22:02:23
问题 I am having problem in creating an transparent rectangle over blurred background. I am trying to do this task on glasspane . Here is my code snippet. void createBlur() { alpha = 1.0f; JRootPane root = SwingUtilities.getRootPane(jf); blurBuffer = GraphicsUtilities.createCompatibleImage(jf.getWidth(), jf.getHeight()); Graphics2D g2d = blurBuffer.createGraphics(); root.paint(g2d); g2d.dispose(); backBuffer = blurBuffer; blurBuffer = GraphicsUtilities.createThumbnailFast(blurBuffer, jf.getWidth()

Choosing a file in-pane with Swing

浪子不回头ぞ 提交于 2019-11-26 20:57:24
I'm writing a GUI in Swing where I want to do a file chooser that is in the main window, looking something like the image below: while there seem to be quite a few tutorials on how to write a popup file chooser, i don't see much information on how this type of chooser might be accomplished in swing. also sorry if this has been asked before, i did a good bit of searching around and wan't able to find anything else.. JFileChooser actually extends JComponent, so you can use like any other component. Here is an example with two in-pane file choosers: public class TestInPaneChoosers { public static

Filtering on a JTree [closed]

隐身守侯 提交于 2019-11-26 17:46:44
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 12 months ago . Problem Applying filtering on a JTree to avoid certain nodes/leaves to show up in the rendered version of the JTree . Ideally I am looking for a solution which allows to have a dynamic filter, but I would already be glad if I can get a static filter to work. To make it a

Replace a class within the Java class library with a custom version

余生长醉 提交于 2019-11-26 16:24:47
问题 The class BasicLabelUI in javax/swing/plaf/basic is affected by a confirmed bug. In my application I need functionality provided by the fixed version (filed for v9). Due to both legal and technical reasons, I'm still bound to the affected JDK version. My approach was to create a package javax/swing/plaf/basic inside my project, containing the fixed version. How can I force my project to favor my included version of the class over the defective class in the installed JDK? This has to be