paintcomponent
List for holding data
i receive float data from the network every 400 ms that i put in 4 arrays of float.I store those arrays in another array, so i have :[详细]
2023-03-23 21:24 分类:问答Circles disappear when maximizing, minimizing or resizing my JFrame.
This is my code: JFrame frame = new JFrame(); frame.setSize(400, 400); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);[详细]
2023-03-23 14:03 分类:问答Using a variable with paintComponent
For a homework assignment, I am trying to paint a box with paintComponent using user inputed variables. I have been able to build what I am need to do using fixed numbers. I have been working on this[详细]
2023-03-17 00:41 分类:问答Issue with JTextPane with background image and clipping rectangle
I have a problem with Swing that I just don\'t find the reason for. I have a JTextPane that has been extended to show a background image. This can be either a raster image (shown via the Standard Java[详细]
2023-03-13 16:57 分类:问答Java Problem with super.paintComponents(g), it makes a print screen
I\'m trying to make a paint in java, with classes and hierarchy. But my paint area isn\'t getting the background color (defined as white) and when i click it makes a print screen in the jpanel area of[详细]
2023-03-12 11:23 分类:问答JPanel not repainting, even when calling repaint() and revalidate()
Hey guys. I have got a JPanel which changes color when it is clicked (this is handled correctly in another class).[详细]
2023-03-10 19:27 分类:问答paintComponent question
What purpose does super.paintComponent(g) serve in this sample code? protected void paintComponent(Graphics g) {[详细]
2023-03-10 02:40 分类:问答Painting in a BufferedImage inside Swing
Im working on a paint application written in java and running into a few (more) problems. I have a gui and a working program(kinda), my only problem is that the lines and graphics that the user draws[详细]
2023-03-08 05:50 分类:问答Java Swing and drawing problem
I have a problem with drawing. I have a frame with one button. Using the mouse, I draw a transculent rectangle. But I have a small problem, because when drawing this rectangle, it is drawing behind th[详细]
2023-03-08 01:22 分类:问答Drawing text or images on top of gridlayout
I am writing a Tetris-based game, and I am using a GridLayout to display the actual shaft which the Tetris pieces fall down. The GridLayout is filled with little JLabel objects. The shaft is itself a[详细]
2023-03-05 22:08 分类:问答