How do I assocaite a tree node object in java with an image?
I have a Tree node. I want an image to be displayed beside the node name when the tree is viewed. How do I go about? ...
I have a Tree node. I want an image to be displayed beside the node name when the tree is viewed. How do I go about? ...
Consider the Java code below, what would happen if there were no paintComponent method in JPanel class? ... import javax.swing.JPanel; public class ShapesJPanel extends JPanel { public void paintComponent( Graphics g ) { super.paintComponent( g ); //more codes here } } ...
When using the Swing graphical editor in NetBeans is it possible for a custom component to detect that it's design time? E.g. public CustomComponent() { initComponents(); if (!isDesignTime()) { someIcon = IconFactory.loadIcon("icons/SomeIcon.png"); } } Basically I'm after something like .net's Component.DesignMode...
Hello World ! I have a JTable with editable cells. Each Cell contains a CarretListener for quick validation of the entered text. But in one special cell you should be able to select entrys out of a list. The List is generated when you enter a text. The Programm serach in a list for entrys equal so the entered text, like google suggest. ...
Hi, I'll like to know if there is a way to create a ImageIcon that is the mirror of another ImageIcon. Searching on Google, I found how to do it by using many AWT libraries. Is there a way to do it with Swing ? If not, I'm still having troubles with the AWT method : The ImageIcon I want to mirror is a animated gif (with contain a tr...
Test[] array = new Test[3]; array[0] = new RowBoat("Wood", "Oars", 10); array[1] = new PowerBoat("Fiberglass", "Outboard", 35); array[2] = new SailBoat("Composite", "Sail", 40); I have the above array and I need to display the results to a swing GUI with a next button that will display the first index values, and when ...
i planning to read swing concept, if it is worth reading ,please suggest some study material ...
Is it possible to add a menubar to one of the windows in a tabbed pane? And is a frame the only container which can have a menubar? ...
Hi , i am new to java GUI programming. i am adding a JEditor pane (with HTML text ) inside a JScrollPane and added the scroll pane to a JFrame.The problem is when i re size the frame the JEditor pane vanishes. Any one help me ? Hi All , Following is the code : here another problem is i set weightx and weighty for the pane .But still ...
i am doing a project related to configuration and memory analyzer for kubuntu. i want to display the system statistics information like CPU usage, RAM usage and proceses etc. graphically using an odometer. i wanted to know if there is any great open source library for graphical component like odometers and other graphing utilities. also...
I've got a non-looping gif that I use as ImageIcon for two JLabels, but not at the same time. My problem is that when I set the second JLabel's icon to be the gif, the animation has already been played, so it only show the last frame of it. Do you know a way to get the animation when the gif is set to the second JLabel? ...
Hi, i am having resizing problem with JList ... Below is my code ...my requirement is to add a JList with some fixed size into a Panel and when i maximize/minimize the Frame the JList should increase/decrease accordingly .please help me ..how to achieve this? Following is the design: Hi Carl , It works in simple cases but not in the a...
I want to display a JToolbar within right side of a split pane, which is also going to contain a JTabbedPane, how can we do that ? wrap TabbedPane and toolbar in some component? ps: user should not be able to minimize, etc in right side pane... ...
Hi , which is one is the best java GUI generating tool NetBeans Jigloo Please suggest me if you have any other choices. I need the following functionalities: Drag and drop feature able to add code manually after some point of time code readability need to rename variables. ...
Hi , I need to add some invisible component into a JPanel to avoid the issues with grid bag lay out.Which is the best way to add these kind of invisible components? ...
Is they a way of adding a watermark to a JTextArea? ...
New to scala and can't seem to find a reference on this situation. I'm trying to override some methods on scala.swing.TabbedPane.pages: The definition of this class is: class TabbedPane extends Component with Publisher { object pages extends BufferWrapper[Page] { def += } } I can't figure out the syntax for overriding any...
Hi, I want to maximize a JPanel inside a JFrame when the user clicks a button.What is the best way to achieve this.The view and the data model should be in sync in both the panels,that is the panel which in the JFrame and the maximized one.Please suggest me some solution. my requirement is: i have a JFrame with 4 JPanels named as JP...
I would like to let my JFrame under Windows not act upon an ALT key press. To clarify, when you execute the following snippet of code: import javax.swing.*; public class FrameTest { public static void main(String[] args) throws Exception { JFrame frame = new JFrame(); frame.setSize(400, 400); frame.setDefaul...
I have an application that runs in fullscreen mode and has been working fine. Now I need to add a simple, undecorated dialog and I'm running into trouble. If I run the application maximized but not in fullscreen, the dialog displays and functions as expected. When I switch back to fullscreen, the dialog will not display. The dialog e...