Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7814323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T05:09:40+00:00 2026-06-02T05:09:40+00:00

I am using a simple Pomodoro timer but I have no sound/speakers, and so

  • 0

I am using a simple Pomodoro timer but I have no sound/speakers, and so I’d like to signal the end of the timer by simply blanking the screen with a specified color, then toggling it a few times with another color. As if I made my monitor a left-turn car signal. How do I control the monitor like that? Is there some win32 code for this?

I’m familiar with Java, and much less with c# or C++

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T05:09:41+00:00Added an answer on June 2, 2026 at 5:09 am

    I’m not sure what is the motive to control the whole screen. Maybe more appropriate would be to show a notification in the system tray.

    Anyhow, using Java you could popup a JFrame in full screen mode. Change its background using a timer a couple of times and then close it. Here is a simplified example that demos something similar :

    import java.awt.Color;
    import java.awt.EventQueue;
    import java.awt.GraphicsEnvironment;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.KeyEvent;
    
    import javax.swing.AbstractAction;
    import javax.swing.JComponent;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.KeyStroke;
    import javax.swing.Timer;
    
    class FullScreenFrame extends JFrame{
        private static final int MAX_COUNT = 3;
        private static final int PERIOD = 1000;
        private JPanel panel;
        private int count;
    
        public FullScreenFrame(){
            super();
    
            setUndecorated(true);
    
            getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0, false), "ESCAPE");
            getRootPane().getActionMap().put("ESCAPE", new AbstractAction() {
                public void actionPerformed(ActionEvent e) {
                    dispose();
                }
            });
    
            panel = new JPanel();
            panel.setBackground(Color.GREEN);
            add(panel);
    
            new Timer(PERIOD, new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    if (count < MAX_COUNT) {
                        if (count % 2 == 0){
                            panel.setBackground(Color.BLACK);           
                        } else {
                            panel.setBackground(Color.GREEN);
                        }
                        count++;
    
                    } else {
                        ((Timer) e.getSource()).stop();
                        dispose();
                    }
                }
    
            }).start();
        }
    
        public static void main(String[] args) {
            EventQueue.invokeLater(new Runnable() {
                @Override
                public void run() {
                    FullScreenFrame frame = new FullScreenFrame();
                    frame.setBounds(GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration().getBounds());
                    frame.setAlwaysOnTop(true);
                    frame.setVisible(true);
                }
            });
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using simple_form , I have a simple input like this: <%= f.input :email %>
when using simple example like at https://developers.facebook.com/docs/reference/dialogs/oauth/ after auth box prompting for additional permissions
Am using simple webservice .asmx.In my web service returning some data like: <?xml version=1.0
I'm using simple close browser javascript statement window.close(); but it doesn't work with any
I'm using simple-modal http://www.ericmmartin.com/projects/simplemodal/ I have one modal that opens on a button click,
I'm using Simple_Form with Rails 3 and it's great. I have a simple question.
I am using simple javascript to make an ajax call , which works well.But
(Objective C) Just using simple AudioServicesPlaySystemSoundID and its counterparts, but I can't find in
I'm using simple statements to keep it, er, simple: The screen goes from 0,
When using simple DTOs in various scenarios I have frequently run into the same

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.