Hello all, I am “very” new to Java and fairly new to programming in general.  I have been reading the “Head First Java” book and while doing one of the examples came across an observation. I created a colored circle and a button when you click the button the circle changes to a random color with the repaint() method. I have dual monitors set up and what I noticed was that If I were to drag the window to the second monitor it fires the repaint() method. Can anyone explain why this happens? I know this is probably something as a new programmer I don’t need to know right now but it did intrigue me so I thought I would ask.

Views: 65

Reply to This

Happy 10th year, JCertif!

Notes

Welcome to Codetown!

Codetown is a social network. It's got blogs, forums, groups, personal pages and more! You might think of Codetown as a funky camper van with lots of compartments for your stuff and a great multimedia system, too! Best of all, Codetown has room for all of your friends.

When you create a profile for yourself you get a personal page automatically. That's where you can be creative and do your own thing. People who want to get to know you will click on your name or picture and…
Continue

Created by Michael Levin Dec 18, 2008 at 6:56pm. Last updated by Michael Levin May 4, 2018.

Looking for Jobs or Staff?

Check out the Codetown Jobs group.

 

Enjoy the site? Support Codetown with your donation.



InfoQ Reading List

Grafana and GitLab Introduce Serverless CI/CD Observability Integration

In a move to streamline development workflows, Daniel Fritzgerald of GrafanaLabs has published a new open-source solution that links GitLab CI/CD events into Grafana's observability stack via a serverless architecture.

By Craig Risi

How AI with Prompt Engineering Supports Software Testing

AI is becoming a key QA tool, aiding in faster scenario generation, risk detection, and test planning. Arbaz Surti showed how effective prompting using roles, context, and output format helps to get clear, relevant, and actionable test scenarios. AI can boost testers, but human judgment is needed to ensure relevance and quality.

By Ben Linders

Azure APIM Simplifies Event-Driven Architecture with Native Service Bus Policy

Microsoft's new feature in API Management (APIM) enables seamless messaging to Azure Service Bus, simplifying API connections in event-driven architectures. By using the send-service-bus-message policy, developers can easily route HTTP requests to Service Bus for asynchronous processing, enhancing integration, security, and control without additional components.

By Steef-Jan Wiggers

Article: Training Data Preprocessing for Text-to-Video Models

In this article, author Aleksandr Rezanov discusses the data preparation for generative text-to-image models to accelerate work on video generation services to be used in TV series and films. He explains how data is prepared and can serve as a starting point for creating custom datasets to develop proprietary models.

By Aleksandr Rezanov

Presentation: Scaling API Independence: Mocking, Contract Testing & Observability in Large Microservices Environments

Tom Akehurst explains strategies for overcoming microservice pain points like environment dependency and slow development. He advocates using realistic API simulation at scale, supported by contract testing , API observability, and GenAI integration. Learn to compose observations, simulations, and contracts to maximize confidence and reduce the toil of maintaining realistic, up-to-date mocks.

By Tom Akehurst

© 2025   Created by Michael Levin.   Powered by

Badges  |  Report an Issue  |  Terms of Service