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: 67

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

OpenEverest: Open Source Platform for Database Automation

Percona recently announced OpenEverest, an open-source platform for automated database provisioning and management that supports multiple database technologies. Launched initially as Percona Everest, OpenEverest can be hosted on any Kubernetes infrastructure, in the cloud, or on-premises.

By Renato Losio

Google Introduces Managed Connection Pooling for AlloyDB

Google Cloud has launched managed connection pooling for AlloyDB for PostgreSQL, boosting client connections by 3x and transactional throughput by up to 5x. This feature simplifies database management by automating connection management and reducing latency.

By Steef-Jan Wiggers

NVIDIA Dynamo Planner Brings SLO-Driven Automation to Multi-Node LLM Inference

Microsoft and NVIDIA have released Part 2 of their collaboration on running NVIDIA Dynamo for large language model inference on Azure Kubernetes Service (AKS). The first announcement aimed for a raw throughput of 1.2 million tokens per second on distributed GPU systems.

By Claudio Masolo

Microsoft Ships OData .NET (ODL) 9.0.0 Preview 3: Safety, Modern APIs, and Spec Compliance

Microsoft released OData .NET (ODL) 9.0.0 Preview 3, the latest preview iteration of the OData .NET client and core libraries, continuing the modernisation effort of the library. This preview focuses on safer default behaviours, runtime API cleanup, and closer conformance with the OData specification as the team works toward a stable 9.x release.

By Edin Kapić

Uber Gets Ready for AI in Network Observability with Cloud Native Overhaul

Transportation company Uber has publishing a detailed account of its new observability platform on it's blog, highlighting that for them, network visibility is now a strategic capability rather than a set of discrete monitoring tools.

By Matt Saunders

© 2026   Created by Michael Levin.   Powered by

Badges  |  Report an Issue  |  Terms of Service