Questions tagged [repaintmanager]

19 questions
10
votes
0 answers

Java 9 replacement for SwingUtilities3.setDelegateRepaintManager

While trying to port swing code to be compliant with the Java module system I got stuck trying to replace SwingUtilities3.setDelegateRepaintManager. I have a component, which when any of its children requests a repaint then I need to transform the…
7
votes
2 answers

How to generate exceptions from RepaintManager

In connection with my question (may be), I found another exception type that I not able to catch and print-out from SwingWorker thread. How can I to generate RepaintManager exceptions? I read this CheckThreadViolationRepaintManager and this approach…
mKorbel
  • 109,525
  • 20
  • 134
  • 319
3
votes
2 answers

javax.swing.Timer slowdown in Java7u40

Invoke javax.swing.Timer#start() same time, 7u25 is not problem. but 7u40 is big problem. Too laggy invoke ActionListener#actionPerformed. (basically same time invoke u25) Totally different move between u25 and u40. (I use Windows 8) I bug…
3
votes
3 answers

Why won't repaint() always call paintComponent and why it doesn't always behave properly when it's called

I'm working on a Tetris clone in Java, and all seems to work properly until I want a full row to be cleared and everything above to be dropped. Although all my data properly represents the transformation, my paintComponent method seems to only clear…
user1726134
  • 31
  • 1
  • 1
  • 2
3
votes
2 answers

how to use clip to reduce paint time?

i am trying to use clip to reduce the cpu load. but the clip leaves some garbage on the screen that i can not seem to get rid of. also, turning clipping on and off seems to have no effect on the cpu load. in either case. most of the time seems to be…
Ray Tayek
  • 9,841
  • 8
  • 50
  • 90
2
votes
1 answer

java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 in Jidesoft DocumentPane

Edit3: This one does not duplicate general "I have indexoutofboundsexception in my code" questions because, as clearly stated in the answer, it was a bug in a widely used third-party library jide-common, confirmed by developers, there's a link…
1
vote
1 answer

When the Graphics instance is created

I know that when paint is happening an instance of the Graphics class should be created. That Graphics object (Actually Graphics2D object) is going through paint() method and all the details that should be printed or updated on the screen are stored…
Ramesh-X
  • 4,853
  • 6
  • 46
  • 67
1
vote
3 answers

PaintComponent Java Slow

I have been developing on my Mac a JAVA Applications . The logic is as follows: A Server sends to a client application some orders to Draw basic shapes The client applications draws the the basic shapes into a Jpanel Every Time a Shape arrives…
1
vote
0 answers

Painting to JPanel breaks when removing JPanel after repaint();

I'm trying to create a 2D renderer for the app I am coding.I'm using paintComponent to paint all the images to the JPanel, and well. Things are going wrong. First of all, I used…
KeirDavis
  • 665
  • 2
  • 10
  • 32
1
vote
2 answers

How to find an exception in swing

i have a problem with java swing. i sometimes get this NullPointerException at random times(perhaps at some painting methode?): (the project has over 100 classes, so it makes no sense to post code here, furthermore i am interested on the right…
user1347198
0
votes
1 answer

RepaintManager that animates damaged regions of components?

I'm looking for a existing class i remember seeing, but can't remember the name. It animated the dirty paint regions used by RepaintManager to update JComponents. It was done by extending RepaintManager i think.
i30817
  • 1,356
  • 2
  • 13
  • 26
0
votes
0 answers

Repainting script even after using barstate.isconfirmed

Below script is firing multiple alerts and I have tried using barstate.isconfirmed but still firing sometimes up to 6 alerts together. I am a beginner to this. //@version=5 strategy('STG1', overlay=true, calc_on_order_fills = true) start =…
0
votes
2 answers

Can a specific RepaintManager be used for a specific JPanel?

I understand that the Java RepaintManager will coalesce calls to repaint(), which is fine for 99% of rendering. I have one JPanel that I'd like to update on a timer (100 ms) with images to provide smooth'ish rendering like video. In practice the…
0
votes
3 answers

Using Swing in Clojure - Compiler Exception: could not initialise RepaintManager

I've just started trying to create a UI with Clojure using Swing. But I am getting a CompilerException when trying to load it. I have been following this tutorial 'https://stuartsierra.com/2010/01/02/swing-into-actions-with-clojure'. I am using…
0
votes
0 answers

Java repaint() doesn't call the paint() in applet

To be clear, I've been researching for more than five hours now, I read all the related questions and more than 20 google searches, none of them worked for me and none of them described my case specifically. First of all here's my code : import…
MkAnis
  • 1
  • 2
1
2