componentlistener

Layout Manager and Positioning

别说谁变了你拦得住时间么 提交于 2019-12-19 18:58:27
问题 how to stick JLabel in GlassPane to rellative, floating coordinates from JProgressBar without using ComponentListener or another listener, is there built_in notifiers in Standard LayoutManagers that can notify about its internal state, and can be accesible for override, instead my attempt with ComponentListener and NullLayout . SSCCE about ComponentListener and with NullLayout import java.awt.Container; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.GridBagConstraints;

Layout Manager and Positioning

喜欢而已 提交于 2019-12-19 18:58:06
问题 how to stick JLabel in GlassPane to rellative, floating coordinates from JProgressBar without using ComponentListener or another listener, is there built_in notifiers in Standard LayoutManagers that can notify about its internal state, and can be accesible for override, instead my attempt with ComponentListener and NullLayout . SSCCE about ComponentListener and with NullLayout import java.awt.Container; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.GridBagConstraints;

Is there a way to get notification when JComponent is not visible anymore beucase parent is removed from collection?

可紊 提交于 2019-12-12 13:59:52
问题 Say I have a simple JFrame with a JTabbedPane containing 3 panels, and the second panel contains a JComponent. Is there a way the JComponent to be notified when "Tab 2" panel is removed from its container? My problem is that the JComponent may be deep in the hierarchy. Obviously, I am looking for SWING solution here... :) ,'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''`. | | | ,----------Y....................... | | | Tab 1 | Tab 2 | Tab 3 | | | :..........: :................

Java 7 resize a JFrame (my GUI): the componentListener is not getting fired

久未见 提交于 2019-12-11 00:47:51
问题 I've Googled around and could not find an answer: I have a JFrame as a GUI and set a componentListener like this.addComponentListener(new CL(this, logger)); In the componentListener I have the componentResized, etc... public void componentResized(ComponentEvent e) { if (e.getSource() == gui) { here I do the code } } Everything is working fine under Java 6, but under Java 7, the Jframe is being resized but is not being repainted: the component listener is not getting called I tried some

Layout Manager and Positioning

你说的曾经没有我的故事 提交于 2019-12-01 17:34:55
how to stick JLabel in GlassPane to rellative, floating coordinates from JProgressBar without using ComponentListener or another listener, is there built_in notifiers in Standard LayoutManagers that can notify about its internal state, and can be accesible for override, instead my attempt with ComponentListener and NullLayout . SSCCE about ComponentListener and with NullLayout import java.awt.Container; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.GridBagConstraints; import java.awt.event.ComponentAdapter; import java.awt.event.ComponentEvent; import javax.swing

Swing: resizing a JFrame like Frames in Linux e.g

拜拜、爱过 提交于 2019-11-26 18:29:03
问题 I would like to know if theres a possibility to implement the resizing of a JFrame in that manner, that it's been resized like for example the standart windows in linux. To be more precise: If the user starts do drag, only the future size if the window will be previewed, while the original content is not resized. As soon as the user releases the mouse, the Frame resizes to that size. In images: (1) state before resizing (2) user starts to drage (at the red circle) (3) user releases the mouse,