Top "Paintcomponent" questions

paintComponent (JComponent.

Using paintComponent() to draw rectangle in JFrame

I'm trying to create a program that draws shapes (a rectangle on the example below) using JPanel's paintComponent(), but I …

java swing jframe jpanel paintcomponent
Creating a simple custom JComponent in Java?

I want to start building my own customized JComponent's for a project at work. I have a simple example below …

java swing paintcomponent jcomponent preferredsize
Why does calling dispose() on Graphics object cause JPanel to not render any components

After learning that dispose() should be called on Graphics/Graphics2D object after use, I went about changing my game …

java swing graphics jpanel paintcomponent
How to "paint" on JLabels on a JPanel?

I have a set of JLabels, each containing a letter (via seText()), opaque and background set to white, on a …

java swing jlabel graphics2d paintcomponent
Java .drawImage : How do I "unDraw" or delete a image?

I need a certain image to be redrawn at different locations constantly as the program runs. So I set up …

java image swing graphics2d paintcomponent
Difference between paint() and paintcomponent()?

I have tried tutorials on this but I still don't quite understand it. Basically my question is which method is …

java swing paint paintcomponent
Adding a background image to a JPanel

I'm working on building a board game in Java. For the game board itself I was trying to place the …

java image swing jpanel paintcomponent
Paint with Swing Java

first of all hi everyone! I'm having a big problem with this: i need to build a program which consist …

java paint paintcomponent repaint jlayeredpane
how can i put a JButton on an image?

I am trying to fix a JFrame where there will be a background image and on the image JButtons which …

java swing size jbutton paintcomponent
Circular Progress Bar for Java Swing not working

i've discovered this test project from Oracle site because i want to add a circular progress bar in my project. …

java swing java-7 paintcomponent jlayer