jpanel
Using a Derived class of a Java Swing control to create listener for self
At the outset: I know that what I am doing is bad design. I am trying this to get a better feel of Java - what is possible, what is not and why?[详细]
2023-03-22 16:35 分类:问答Grab focus to a JPanel in a JLayeredPane
I have a JLayeredPane with 2 layers the first layer is a JPanel Wrapping an Image. the second layer is another object which extends JPanel called ResizableRectangle and implements KeyListener.[详细]
2023-03-22 11:33 分类:问答Design Issue: MVC model with Java CardLayout application
Sorry for the vague title, I am trying to layout an application i have unfortunately starting coding without following proper MVC architecture rules. I have an application that has the following struc[详细]
2023-03-22 10:49 分类:问答Show Image selected from JFileChooser in a set sized JPanel (image must be re-scaled)
I am trying to fit an image in a set sized JPanel (picture panel--- black border line) (MUST FIT THE JPANEl \"Picture panel\"). When i click the upload button, i am able to see the JFilechooser in a n[详细]
2023-03-21 03:30 分类:问答How to make a rotated panel in java
I want to know if there is some way to rotate a panel without changing its shape. I mean I am able to rotate the drawings inside the panel using rotate() given in graphics2D but the rectangular drawin[详细]
2023-03-20 23:22 分类:问答JLabel is in a wrong position in my JPanel
I have a class which extends JPanel and I want to add some labels (actually a class which extends JLabel) on it. The layout of this panel in null. i\'ve set the size and the location of my label, but[详细]
2023-03-19 07:07 分类:问答how to add JPanel to auto generated netbeans JFrame?
I have a开发者_JAVA技巧uto generated netbeans GUI (JFrame) and I\'m trying to add an external JPanel (different class) to the JFrame but it failed.What i\'m supposed to do?[详细]
2023-03-18 23:03 分类:问答Getting action events of buttons placed in a different component
Is it possible to display a button outside the component in which it is placed. My question seems weird, but the situation is: I have a JFrame. I also have a JPanel class in which I override the paint[详细]
2023-03-18 13:20 分类:问答JPanel not refreshing upon selection with JComboBox
I am attempting to write a pretty short class that \"ties\" a JPanel to a JComboBox.I think I have the logic down, but nothing happens when I select something new using the JComboBox...Here is (more o[详细]
2023-03-18 07:23 分类:问答How do I order two components in a JFrame in order for transparency and ActionListeners to work?
When adding two components to a JFrame, where one sits inside another, If I add them in the order, Fullscreen Object, then JPanel, the JPanel displays correctly, but is essentially invisible, i.e it\'[详细]
2023-03-18 01:17 分类:问答