gpan | Streetview Panorama downloader | Download Utils library
kandi X-RAY | gpan Summary
kandi X-RAY | gpan Summary
Streetview Panorama downloader
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of gpan
gpan Key Features
gpan Examples and Code Snippets
Community Discussions
Trending Discussions on gpan
QUESTION
I have three classes, the first one is the main window smthn like
...ANSWER
Answered 2019-Aug-24 at 21:57A couple of problems I noticed.
When you call main in
TryGraph
, you create a new instance. But you already have an instance of TryGraph when the button was pressed.Don't extend
JFrame
. It's bad practice. Just create an instance of it.Only use
one static main entry point
.The big problem is that you put
repaint()
in a tight loop. Don't do that. Just call repaint(). Remember that repaint is run on theEvent Dispatch Thread
. So if that thread is tied up, nothing else will work.Don't dispose of your graphics context. You can do that if you create a new one but otherwise don't get rid of it.
Finally, put super.paintComponent() as the first statement in your JPanel paintComponent method.
I suggest you read about painting and the EDT in the Java Tutorials.
Here is the modified code, all in one file.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install gpan
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page