Questions tagged [repaint]
Repaint refers to issues relating to re-rendering or redrawing user interface screens or portions of those screens.
1,268
questions
1
vote
0
answers
17
views
Coerce repaint of the current swiped item in Telerik ListView for Xamarin
To make a Minimal Reproducible Sample I have created a bound Record class and when this item is swiped it reveals the [$] button. Tapping the button successfully closes the swipe and updates the list ...
0
votes
1
answer
24
views
Repainting in while loop
I know that this question has been asked many times in a similar way on this platform. I've already spent a few hours trying the answers on my code (Threats and much more), but nothing has worked for ...
0
votes
1
answer
20
views
how to update panel with repaint()?
I have a panel-class:
public class MyPanel extends JPanel {
Color myColor = Color.BLUE;
String string = "Hello";
public void update(String newString) {
myColor = ...
0
votes
1
answer
55
views
repaint() not updating panel?
I have a class (not public, so you probably do not know the class) which is drawing a picture with picture.draw(g2). With picture.changeToDry() I can change the picture. It works fine, when I call the ...
0
votes
2
answers
76
views
Issues my method to get a 2D circle to move in a circle
OBS! Changed as part of the question has been answered.
My math has been fixed due to your help and input, the same with StackOverflowError but I still can get my head around how to make the circle ...
0
votes
1
answer
35
views
How to prevent a plot from the past repainting?
Is there a way to prevent a plot that has already appeared from erasing itself shortly after? I'm using pinescript on TradingView and an indicator sometimes does this. I'm aware it is due to security()...
0
votes
0
answers
45
views
Keep getting warning about repainting on my tradingview strategy, having a hard time fixing it
I've tried all the solutions provided here:https://www.tradingview.com/pine-script-docs/en/v5/concepts/Repainting.html besides the "nonRepaintingsecurity()" one because it doesn't seem to ...
0
votes
0
answers
35
views
Java frame screenshot showing repaint artifacts
I'm performing screen shots of my app's JFrame, but often a drawing artefact shows up, such as an image in my frame in the upper-left corner (not where it normally is), because I believe it's catching ...
1
vote
0
answers
21
views
Java Trying to wait inbetween repaints
Im making a game over the summer break and im having trouble with dealing with the walking animation. Im trying to put a stepping animation in between moving to the left or right trying to invoke ...
0
votes
1
answer
42
views
Java -Repaint() not working when i want to call it
I wonder why the repiant() method is not working as intended. My Code:
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java....
0
votes
1
answer
23
views
Jlabels flickering or randomly not showing
I have a problem with a Java 2d game I'm developing.
Some of the game screen elements are drawn in a Jpanel overriding the paint() method and some other elements are Jlabels added to that panel.
The ...
1
vote
0
answers
23
views
After screen wake up, frame and controls not updating for a while
I am building an application with some swing drawings, but after the screen sleeps, it can take up to 30 seconds after waking to begin showing changes. Even a JLabel on the screen stays frozen.
I took ...
0
votes
0
answers
28
views
PineScript MultiFrame repainting
i'm new to pinescript and i would like to repaint automatically a Bollinger Bands MTF.
The problem is when i set the bands on 5min MTF and i go on 1min chart, it will trace every 1min. Thanks for your ...
0
votes
0
answers
28
views
paint()-mehod faster while mouse is moved
I am currently working on a private project that uses a normal java JFrame, in which I paint an image (in form of an int[][] with ARGB-values). Then I plot this image pixel by pixel inside the paint()...
0
votes
0
answers
49
views
Repaint all components of a JFrame/JPanel
I'm working on some animation where I have a certain number of dots wandering around my JFrame and based on their distance they should be connected by lines of different strengths.
The base code for ...
0
votes
1
answer
55
views
Swing JPanel repaint issue when it occurs while being on another gnome desktop
I am facing a problem driving me nuts. I have a panel which I update this way :
removeAll
add new JComponents
revalidate
repaint
Most of the time, this works perfectly fine. However, if I switch to ...
-1
votes
1
answer
52
views
repaint(); not Updating
I'm new to java, and as a challenge I'm following some tutorials on how to create a small game. I've managed to make a nice keyboard input reader but sadly I don't know why my repaint(); isn't working....
0
votes
1
answer
54
views
java.awt.Graphics2D repaint() method
I am experiencing two separate issues one with Graphics2D in general and one with the repaint() method specifically.
First the repaint() issue. I have a plot that updates based upon a user chosen time ...
1
vote
1
answer
54
views
Why doesn't window.getComputedStyle invoke recalculate styles and reflow?
Look at this example:
const startTime = performance.now();
setTimeout(() => console.log(`taken time: ${performance.now() - startTime}ms`))
for(let i = 0; i < 1000; i++){
const element = ...
1
vote
1
answer
211
views
Where did Firefox's "Paint Flashing Tool" go (in Firefox ~96)?
The "paint flashing" tool in Firefox seems to have vanished.
Both the docs and this answer are outdated. I'm running Firefox 96.0.2 (and Firefox Developer Edition 97.0b7) on a mac, and ...
0
votes
0
answers
40
views
Why does repainting continue to occur even though security features are fully implemented?
//@version=2
strategy("GetTrendStrategy", overlay=true)
tim=input('300')
longCondition = crossover(security(tickerid, tim, close),security(tickerid, tim, open))
if (longCondition)
...
0
votes
0
answers
38
views
revalidate() and repaint() don't work Java Swing
I have an app in Java where the user has to guess some words. I have about 8.5k words and each of them are split into levels and groups. 5 levels to be exact and the groups are different based on the ...
0
votes
0
answers
140
views
Flutter repaint and rasterize entire screen on changing TextField cursor
I have a very simple flutter app which render a TextField in the middle of screen.
Here's widget tree: MaterialApp > Scaffold > Center > Padding> RepaintBoundary > TextField
Here is ...
0
votes
0
answers
28
views
repaint in security function (live candle)
when i change the time frame , from 1h , to 4h , DR value change , but in 1h time frame DR value is correct
And this repaint repeat when change timeframe from Monthly to Weakly and other timeframe
i ...
1
vote
1
answer
156
views
What happens if we manipulate DOM in requestAnimationFrame?
My understanding is whenever there is some DOM manipulation like inserting a DOM element would trigger a reflow and most likely followed by a repaint. Please correct me if I'm wrong. Quoting the MDN ...
0
votes
1
answer
35
views
How do I suppress a window background paint in XLib?
I'm new to X and Linux programming in general. It's pretty easy to suppress a window background repaint (to reduce flicker when the window is resized) using VC++ and Windows. However the architecture ...
0
votes
0
answers
35
views
Using a JButton to add shapes to a JPanel
I am making a JPanel that needs to add colored squares as the user interacts with it.
public class Corkboard extends JPanel {
Color colour = Color.RED;
Graphics gr;
int x = 20;
int y =...
0
votes
0
answers
83
views
Issues with repaint on canvas
I am working on a program that allows the user to place pieces on a Go board, and updates to place the pieces on the nearest intersection to the user's click in a GUI. I've figured I use the repaint() ...
0
votes
0
answers
35
views
repaint() method with Graphics is not being invoked [duplicate]
I am trying to create a brick breaker game as a personal project. I using an MVC design with paint() and Graphics for the GUI.
When I call repaint(), the paint method is not being invoked. Below is ...
0
votes
0
answers
95
views
What Chrome DevTools Initiator "Reveal" means?
I am debugging website (React app) performance using Chrome's DevTools and found that in exact interval there is called "Task" which is doing style recalculation and re-paints. At that time, ...
0
votes
0
answers
36
views
calling repaint on jpanel causes its children to shift
Im currently working on a game and i hava a jpanel that has a custom button and a jlabel, and when pressing the button the game starts.
i am trying to make that panel fade in with a timer animation by ...
0
votes
0
answers
118
views
How to draw Image Inside Circulr path in Canvas in Flutter
Hello can anyone tell me how can i draw image inside circular path with scaled image that fits inside the path. I tried but could not able to figure out and bothering a lot. Please help me.
Paint ...
0
votes
1
answer
74
views
Repaint() requests coalescing into one is a myth?
Everywhere I look it is said that there is no need to worry about multiple repaint() requests, as they are getting coalesced and postponed to happen simultaneously in one optimized batch. But this ...
0
votes
1
answer
59
views
Please explain the working of repaint() method in java?
I have seen many questions similar to this But I am not able to understand why the repaint do not work properly
In my program Before exiting the Frame I called repaint() use Thread.sleep to delay the ...
0
votes
1
answer
71
views
Problem with Tristate QCheckBox not repainting itself when set programmatically
When I have a QCheckBox with tristate set true, it does not repaint itself when transitioning from Qt:PartiallyChecked to setChecked(true) programatically.
A minimal example built in QDesigner places ...
0
votes
0
answers
80
views
Moving objects to mouseclick position java
I'm fairly new to programming. I'm trying to figure out how to move an object to the position where my mouse clicks within a panel. The object can be represented as a shape like a circle and is ...
0
votes
1
answer
55
views
Why wont my image move when the y value of it is increasing?
I'm currently having an issue where the image won't move when the y-value of the image is increasing. I wanted the image to move vertically so I made a method that controls the speed of the image, The ...
0
votes
1
answer
77
views
Why won't the background color be filled with repaint(e)?
So I'm not sure what the problem is with the repaint method. It won't fill in a new background colour. It doesn't seem to print out a text within that method whenever I tried to debug it. I have 3 ...
-1
votes
1
answer
57
views
Why is repaint() not calling paintcomponent in a swing timer?
When I use repaint() in the swing timer method startTimer, it just simply doesnt call paintcomponent(). Everything works inside of the timer method except repaint(). Im pretty new at java so if anyone ...
1
vote
1
answer
39
views
how to repaint JPanel after events occured
I'm trying to repaint JPanel after events occured. I don't really know how .repaint() and .revalidate() works. Everybody tells me it'll work but not for mine.
My code consists of ParentFrame, ...
1
vote
1
answer
35
views
Is there a way to make a section of the paint() method only run once in Java?
I am trying to make an Uno game (not important), so I need to draw some rectangles and images at the start of the game to set up. However, when the deck is clicked, it needs to add a card to the ...
0
votes
0
answers
16
views
how to repaint all JTabbedPane panels [duplicate]
is there any solution to repaint all tabs in JTabbedPane by clicking in one button ?
I'm doing a Dark mode button so I need to repaint all my panels in JTabbedPane to change panels backgrounds
0
votes
2
answers
199
views
JList repaint single element
I've got a JList whose elements consist of image files for which I'm creating thumbnails (in a background Thread). When these thumbnails become available, I'd like to force a repaint of just that item....
0
votes
1
answer
322
views
Pine Script Multi Time Frame - My strategy is repainting and I can't figure out why
I thought I understood how to avoid repainting, but I'm still seeing trades on my chart not lining up with alerts, or vice versa.
My script takes data from the 60m chart to trade on the 15m chart. I'm ...
0
votes
1
answer
66
views
How do I print a shape in a loop? [closed]
I am trying to print shapes in a loop, but when I run the program nothing shows up. I am using shapes from a custom class I made earlier. I use mouse clicks to get each end of the mouse (in a ...
0
votes
1
answer
56
views
Will changing the width of an element cause a reflow after setting visibility: hidden for it?
Take this code snippets for example:
const div = document.querySelector('#div')
div.style.visibility = "hidden"
div.style.width = "200px"
div.style.visibility = "visible"
div {
width: 100px;
...
4
votes
0
answers
169
views
Flutter customPainter doesn't repaint
shouldRepaint doesn't repaint when there is a change:
import 'package:flutter/material.dart';
class MainCanvas extends CustomPainter{
static var penPointsToRender = [];
@override
void paint(...
0
votes
2
answers
159
views
How do I properly implement a mouselistener to my Jcomponent?
I have a project where I need to create a GUI in Java that creates a circle on mouse-click and and continues to make trailing circles as the mouse is dragged through the frame. I've been given ...
-1
votes
1
answer
99
views
paintComponent not called when I scroll both Horizontal and Vertical scrollbars in a JScrollPane
I am having trouble with Swing and the JScrollPane.
I am having a strange behaviour.
I extended JScrollPane. I display an image in it and draw rectangles over it to define areas.
With a big image, I ...
0
votes
1
answer
61
views
Why is my repaint method not called here? [duplicate]
Why is my repaint method not called here?
package UI;
import Observer.Obs;
import javax.swing.*;
import java.awt.*;
public class InfoPanel extends JPanel implements Obs
{
String bTime = "1:...