paintcomponent
Setting up a JPanel in a JFrame?
So, I\'ve been working to redo my code so that the painting is all done in a JPanel instead of a JFrame so I can do some very much needed image buffering.[详细]
2023-04-10 14:31 分类:问答Newly created graphics object only showing after resize of frame
This is a continuation from this post I have a set of random sized graphics adding and drawing onto a JPanel component. I have a button that is adding a new draw object to the same JPanel but is not[详细]
2023-04-07 12:47 分类:问答How to move the image inside the JApplet in vertical line?
I have displayed an image(ball) inside the JApplet, now I want the image to move in a vertical way (up and down).The problem is I don\'t know how to do it.[详细]
2023-04-05 03:09 分类:问答Simple custom Swing JComponent always flat
I\'m just playing with Swing and I\'m working on a really simple Swing component. I have a component inherited from JComponent class and its UI inherited from ComponentUI. The paint() method looks lik[详细]
2023-04-04 18:28 分类:问答How to do not repaint JFrame? Just paint
I need help with simple program. I would like, when I click program marks it. I would like to see my moves did in past. Like pencil in paint.[详细]
2023-04-03 12:57 分类:问答Painting pixels images in Java
Which method is the best way to create a pixel image with java. Say, I want to create a pixel image with th开发者_运维问答e dimensions 200x200 which are 40.000 pixels in total. How can I create a pixe[详细]
2023-03-28 00:51 分类:问答JButton Customization Issue
I need some help with customizing JButton. I am using following extended method to do so ... I need to add backgound color to the button and also i need to place two different text at two location in[详细]
2023-03-25 21:32 分类:问答Odd graphical bug: a copy of component A is painted on component B. HELP! (java)
I have made a simple paint program in which you can use a brush-tool to paint some different colors and era开发者_如何学编程se (simply paint in white).[详细]
2023-03-25 15:41 分类:问答Is it acceptable to make a graph this way for JPanel?
I need to graph some statistical data inside of someone\'s class which extends a JPanel. Right now the plan is to use paintComponent and the Graphics class as follows:[详细]
2023-03-24 14:43 分类:问答Java - using paintComponent for graphics, calling functions from within?
I\'m really confused with the program flow for how the paintComponent function works within my JPanel. Ideally I\'d like to have access to the Graphics object to draw stuff from other functions based[详细]
2023-03-24 04:47 分类:问答