repaint

SVG repaint

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. When using Firebug I have been able to confirm that the circle elements representing my poi...

Java GUI repaint() problem? [solved]

Hi, I have a JFrame. This JFrame contains a JButton. I click the JButton and 10 JTextFields are created. the problem: I cannot see them until "I force a repaint()" by resizing the window. Only then do I see the JTextFields created. CODE: JPanel points = new JPanel(); //Creating the JTextFields: for (int i=0; i<10; i++) { JTextFie...

Java GUI repainting problem?

This one's a tough one - I have a JFrame that generates JTextFields. When I go from generating 2 JTextFields to 12 JTextfields (for example), I see some error where there is an extra differently-sized JTextField at the end. It seems to be a repaint error. Main.java code: import java.awt.; import javax.swing.; public class Main ...

Datagridview scrolling/last row problem (.Net Winforms)

Hi all, I have a grid with 7 and half rows visible. I have managed to display the last row fully but the half row space after the last row does not repaint and shows whatever was there previously. Even if I drag another window over my form with the grid and then minimize it, the empty space shows content of the minimized window. I've tri...

Why is my Panel's repaint not being called?

I've got a problem which I just can't seem to get around involving a small animation. For a project we are designing a J9 application to run on a PDA (DELL Axim X51). The problematic code (shown below) is when a mouse click is detected to run a small animation in a nested panel. If the animation is run independently of the mouse click, i...

Force screen redraw after drawing to screen's DC C++

I'm creating a Windows Mobile custom SIP and as the user presses or "hovers" over a button on the keyboard I draw it's corresponding selected image (iPhone-esque) to the screen's DC using ::GetDC(NULL). It is developed in Win32 C++. My problem is that I can never get the screen to repaint itself, erasing the previously drawn key. I'v...

Determining when IE activex control has been repainted.

I was using spy++ and noticed that the IE control I have embedded in a windows form was periodically calling or sending WM_PAINT when it repaints itself. I'm trying to figure out how in C# code I can perform a C# method every time this control sends WM_PAINT. I know just enough pinvoke at this point to be dangerous. Thanks in advance,...

How can I split up paint swing method in java?

I'm developing a fair sized hospital simulation game in java. Right now, my pain method is starting to look a little big, and I need a way to split it up into different sections... I have an idea, but I'm not sure if this is the best way. It starts by painting the grass, then the hospital building, then any buildings, then people, then a...

Flash Bug - Force screen repaint

I have a Flash project that is a little unique in that it's an AS3 project that loads AS2 SWF files. I used the JumpEye bridge to make it all play together, but I'm experiencing a weird bug. The bridge file has two locations to load a SWF file. The main section and the preview section. The first time I load a preview, it loads and cl...

(Java) Appearing/Disappearing JLabel in a JPanel only disappears on resize

I'm working in Java, and I have a JPanel in a JFrame. In that JPanel, among other things, I have a JLabel that I want to make appear and disappear at will. I've tried setting visibility to true/false, adding and removing it from the JFrame and JPanel, and, having looked online, I tried validate()ing and revalidate()ing ad infinitum. What...

Swing: Can't get JButton to update - repaint() not working

I'm using Swing for the first time to create a simple GUI. It consists of a JFrame upon which I have placed a single JButton which, when clicked, calls some other code which takes approx. 3 seconds to return. Just before the call to this code, in actionPerformed(), I want to update the text on the button to inform the user that processi...

Java repaint not working correctly

i use the java repaint method , it repaints, but the update is only seen when I either click on the canvas or resize the panel. How can I fix this ? What causes it? ...

Blackberry -- Updating screen changes drawing order of manager its field elements

Scenario In a screen I have 2 managers: 1) menu manager at the top and 2) body manager that has info/button elements. The menu manager does custom drawing so that its menu elements (LabelFields) are properly spaced. Core Issue - Manager and subfield drawing order The screen draws fine except when the user preforms an action (clicks a b...

Form not repainting itself

How can I make the FileOpenDialog disappear? private void ofdAttachment_FileOk(object sender, CancelEventArgs e) { string fullFilename = ofdAttachment.FileName; string filename = Path.GetFileName(fullFilename); string dirName = Path.GetDirectoryName(fullFilename); this.Parent.Refresh(); this.Refresh();...

Disable winforms refresh

Every time I change the enable disable property of the controls on my winform it repaints the whole form. I want to avoid the redundant repaints by only repainting when i have updated all of the controls. Is this possible? ...

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

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 displayed. I ended up with the code below. It works but not perfectly. Specifically when i scrol...

How to combine repaints in Swing?

I am calling repaint a bunch of times from a listeners, but the way I designed my paint function is only one repaint is required. I generate a bunch of repaints, since it hooked into my mouse motion listener. Is there a way to cancel all pending repaints for a certain component? I can't just start ignoring repaints, since some are val...

Detect repainted area of screen in java

I am creating an applet which will do something like screen sharing . For that I am using Robot class to capture screen area . I want to capture the dirty / repainted areas after first screen shot. I think RepaintManager manager can be used for that. but i dont know how can I use it. I am a novice so a java code will be helpfull. thanks ...

Forcing a repaint of a WPF control

I currently try to create classes for a paint-like WPF application. I have to base classes LineMovement (line from StartPoint to EndPoint) and PathMovement (line going through all points specified in a property Points of type PointCollection). These classes inherit from Control and get their looks through a ControlTemplate. The ControlT...

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 scrollbar(vertical)... Now when i scroll down using that autoscroll the form is not updating its view as i...