Questions tagged [repaint]

Repaint refers to issues relating to re-rendering or redrawing user interface screens or portions of those screens.

Repaint is the process of re-rendering or redrawing user interface screens or portions of those screens. A number of different paint techniques may be employed in 2-D or 3-D graphics.

1282 questions
-3
votes
1 answer

Don't understand why reapainting is so slow

EDIT: I DO the same thing here but problem does not occur. import java.awt.Color; import java.awt.Dimension; import java.awt.GridLayout; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import javax.swing.BorderFactory; import…
Yoda
  • 17,363
  • 67
  • 204
  • 344
-4
votes
3 answers

Java repaint does not do anything

Here is my problem: I have a JPannel Order, in which I have different components; one JTable, and a few JLabel. These components are filled with datas coming from an object "commande"(order)ex: idOrder, customer, Price... This JPannel is inside an…
Greg Artisi
  • 172
  • 2
  • 12
-4
votes
2 answers

Why repaint() not always work?

In my first program repaint work corectly, but in the second program i have a problem with it. import java.awt.Graphics; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import…
markus
  • 3
  • 1
-4
votes
1 answer

Java snake game

Well starting off i must admit there are countless snake questions out there, though every Programmer even if newbie or expert writes his code differently so i decided to open another one case, import java.awt.Color; import java.awt.Graphics; import…
-5
votes
1 answer

Can I draw n rectangles using FOR loop in Java?

How can I use or replace the code down below using for-Loop to draw size (25 * 25) rectangles in Java? if (drawRectangles == 1) { graphics.fillRect(430, 428, 25, 25); } if (drawRectangles == 2) {graphics.fillRect(430, 428, 25, 25); …
-5
votes
1 answer

repaint() doesn't work - what do I wrong

Could you tell me why my repaint() method doesn't work in my code? Do you know some websites from which I can learn the basic stuff. Thanks in advance. public class OknoGry extends JFrame { public static enum Tryb{NOWA_GRA,LISTA_NAJLEPSZYCH,…
Kabun
  • 35
  • 3
-6
votes
1 answer

Center Align a rectangle in Java Frame/Panel

Trying to create a bull' eyes program using paintComponent. I want the rectangle to be in the center of the screen. How do i do that?
1 2 3
85
86