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

  • SEARCH
  • Home
  • 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 6686103
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:08:00+00:00 2026-05-26T05:08:00+00:00

I need to construct a marquee in java application. I thought that a JLabel

  • 0

I need to construct a marquee in java application. I thought that a JLabel is a good control to work with. I have done something with horizontal marquee label but making it vertical isn’t so easy for me.

  • 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-05-26T05:08:01+00:00Added an answer on May 26, 2026 at 5:08 am

    You can use a JPanel with a JLabel inside to marque using the class below

    import java.awt.Color;
    import java.awt.Dimension;
    import java.awt.Point;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    
    public class MarqeuePanel extends JPanel implements Runnable
    {
        private boolean IsStoped = false;
        private JLabel label;
        public MarqeuePanel(Dimension d,Point p,String text)
        {
            super();
            label = new JLabel();
            label.setText(text);
            add(label);
            setSize(d);
            setOpaque(false);
            setBackground(new Color(0,0,0,0));
            label.setLocation(0,this.getSize().height);
            Thread t = new Thread(this);
            t.start();
        }
    
        @Override
        public void run() 
        {
            //Marqueue
            label.setLocation(0,this.getSize().height);
            while(!IsStoped)
            {
                if(label.getLocation().y < -label.getSize().height)
                {
                    label.setLocation(0,this.getSize().height);
                }
                else
                {
                    int x = 0;
                    int y = label.getLocation().y - 1;
                    label.setLocation(x,y);
                }
                try{Thread.sleep(30);}catch(Exception exc){}
            }
        }
    
        public void StopMarque()
        {
            IsStoped = true;
        }
    }
    

    Just careful if you need New Lines ,you can use tag’s

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to construct a tree in Java. I am already done with tree
I have the need to construct a LINQ To SQL statement at runtime based
I have a case where I need to construct following structure programmatically (yes I
I have a project where I need to construct a fair amount of configuration
The problem is that I need to construct the following SELECT statement: SELECT c.Animal/Dog,
Is there any library or custom control that allows to construct LINQ to Objects
I have an array I need to construct with a pre-determined number of zero-value
My work requires a construction of ontologies modules. For this I need to construct
I need to construct an MSBUILD script executes .SQL Scripts which have changed since
I need to construct a single transaction / stored procedure that takes in two

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.