Skip to content
Advertisement

Tag: swing

What GUI libraries are the JetBrains using?

Background I am somewhat new to Java and am enjoying using IntelliJ IDE developed by the JetBrains team. I have downloaded the source for the Community Edition, and I am trying to work out what GUI libraries they are using to get the look-and-feel. Question What libraries (if any) are they using to get the non-native tabs, toolbars and breadcrumb

Getting location of cell in JXTreeTable

How to determine the location of a particular cell in JXTreeTable on screen? Answer not sure, but merging some information gathered on topic. this link shows the way to compute swing component coordinates: Getting coordinates of a component in java this link shows, that JXTreeTable extends JTable:- this link shows the way to retrieve coordinates of cell in JTable: http://www.java-forums.org/awt-swing/23061-jtable-cell-coordinates.html

Refresh elements of GUI in java

I’m new to GUIs in java. For example, I need to update just 1 element (e.g., JLabel). In Tkinter I would use something like root.update() or root.update_idletasks(). I wonder if a similar simple function exists in for applications made with swing. I’ve tried gui_element.SetVisible(false) and gui_element.SetVisible(true) and similar stuff, but not very successfully. I suspect something with javax.swing.Timer should work,

JFrame Image, paint on top of it

I create a frame with an image with this code: That works fine, but now I want to paint something in that opened frame (on top of the image). I’m quite new in Java, and I’ve allready tried to make a class that extends JFrame, with a paint(Graphics g) method in it, but it wouldn’t work, I only see the

JLabel HTML4 support

My question is if JLabel (java swing) supports html4 and css2. I know, it supports html3.2 but I want newer version. Or is there another way to display html4 on a jPanel. Answer In short: no; HTML 3 only, before CSS. The “HTML” supported by JLabel, JButton, etc, is things like <font color=”” face=”” /> and <a href=”#”> to provide

Call itemStateChanged() only after user interaction

in my swing application I have a combo box with an ItemListener that does X if the user changes the value (via itemStateChanged()). However I also have a different function that changes the value of that combo box. In this case I do not want X to be done. Is there a way to find out if the state change

How to lock aspect ratio of a gridLayout in Java?

Is there an easy way of locking the aspect ratio of a GridLayout component in Java Swing ? Or should this be done on the JPanel containing that layout ? Answer GridLayout effectively ignores a component’s preferred size, but you can control the aspect ratio of whatever is drawn in paintComponent(), as shown in this example. The rendered shape remains

Advertisement