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
5
votes
0 answers

How to differentiate between reflow and repaint in chrome developer tools?

How to differentiate between repaint A repaint occurs when changes are made to elements that affect visibility but not the layout. For example, opacity, background-color, visibility, and outline. Repaints are expensive because the browser …
MployBy
  • 107
  • 1
  • 2
  • 9
5
votes
2 answers

Java hangman game repaint() not working

I have been making a hangman game to teach myself Java. I've got in the main body of the frame. this.add(new PaintSurface(), BorderLayout.CENTER); I've got: private class PaintSurface extends JComponent { Shape found = null; public…
Geoff
  • 583
  • 2
  • 7
  • 25
5
votes
2 answers

In C#, how do you send a refresh/repaint message to a WPF grid or canvas?

How do you send a refresh message to a WPF grid or canvas? In other words, I have noticed while in debug mode, I can write code that sends a line to the display and then, if that line is not right, I can adjust it -- but the previous line is still…
xarzu
  • 8,657
  • 40
  • 108
  • 160
5
votes
1 answer

Points drawn in the onload event of the SVG element are NOT being displayed when rendered

I'm working on drawing an SVG grid using Javascript. I've managed to get the axis drawn, as well as my quadrant labels. However I've run into an issue adding my dynamic points. I'm trying to draw the points in the onload event of the SVG element.…
Daniel
5
votes
2 answers

Calling setVisible(true) on an already visible frame

Question: What does calling setVisible(true) on a JFrame which is already visible do? I was digging through the source code of JFrame, and ultimately, it boils down to this function in Component which does nothing to a frame if it is already…
dberm22
  • 3,187
  • 1
  • 31
  • 46
5
votes
1 answer

IE10 Repaint/Redraw issue

You can see this working/breaking here: http://new.campchampions.com/parents The issue only crops up in IE10. After the user has scrolled a little ways, the navigation becomes pinned (a class of fixed gets added to the body which effects the…
Steve Meisner
  • 666
  • 9
  • 17
5
votes
1 answer

Swing refresh cycle

I'm trying to understand when to use revalidate/repaint/pack. Surprisingly I haven't found much detailed under-the-hood documentation (feel free to link). So far I have understood that this is all the responsibility of the RepaintManager.…
kotoko
  • 599
  • 2
  • 6
  • 22
5
votes
4 answers

smooth scrolling .net forms

Hi I am using forms in .net and i am adding lots of linked labels dynamically during runtime, I am adding these linklabels to panel and adding that panel to the winform. When the no of linklabels increases the form puts out an auto…
FatDaemon
  • 766
  • 2
  • 8
  • 13
5
votes
1 answer

How to disable the default painting behaviour of wheel scroll event on JScrollPane

I recently purchased the book Filthy Rich Clients and i found it really useful and fun. Building on one example from the book i tried implementing a custom ScrollPane that displays a "shadow" on the bottom of its view over the component to be…
Savvas Dalkitsis
  • 11,476
  • 16
  • 65
  • 104
5
votes
1 answer

JButton copied when repainting?

I have a JFrame with 2 JPanel in it: a PaintPanel (with a paint() method) and a ButtonPanel (with buttons). When I invoke the repaint() of the PaintPanel (but clicking the button) the button of the ButtonPanel is being painted in the PaintPanel! It…
Lucivius
  • 83
  • 4
5
votes
4 answers

using repaint() method with actionPerformed

How to use the repaint() method when a button is pressed and Graphics p has to re-paint everything from scratch? Thanks. import javax.swing.Box; import javax.swing.JButton; import javax.swing.JTextField; import java.awt.*; import…
MBC870
  • 373
  • 3
  • 8
  • 16
5
votes
4 answers

repaint() Method in Java

I am playing around with the Java graphics class a little bit and I was just wondering--when is it necessary to call the method repaint()? I tried commenting it out and it didn't seem to affect my output GUI. I've seen it used a lot in Java GUI code…
stk1234
  • 1,036
  • 3
  • 12
  • 29
5
votes
1 answer

java swing button does not repaint properly after dialog closed

I have a JButton and pressing it opens a modal dialog. When I close the dialog, the button still look like it is still in a pressed state until I move the mouse. I think this is happening because the JDialog is opened on top of an AWT component…
Jeff Storey
  • 56,312
  • 72
  • 233
  • 406
5
votes
2 answers

repaint() fails to work

I wanted to draw an image on my panel based on the data I receive from another thread. I am sure the data and consequent pixel array works well, but the repaint() would never work. Can anyone tell me what's going wrong here? import…
Daniel
  • 1,484
  • 5
  • 24
  • 42
4
votes
1 answer

Can't re-add the same panel

This is driving me insane. I'm trying to change the panels when you click on 3 different buttons and it works, but for one panel - only once. If you click addPerson - the Person panel shows, If you then click addCD - the CD panel shows; (same for…
liloka
  • 1,016
  • 4
  • 14
  • 29