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 8226911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T15:56:22+00:00 2026-06-07T15:56:22+00:00

I was looking for a library to create tag clouds in a Java application,

  • 0

I was looking for a library to create tag clouds in a Java application, and I found OpenCloud.

I don’t want to have to use a web server, which OpenCloud will require to get the output in, won’t it? Is there a way to get OpenCloud to work in a Java/Swing panel? I want something for a stand alone application. If this isn’t possible, where else can I look for such an API?

  • 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-07T15:56:25+00:00Added an answer on June 7, 2026 at 3:56 pm

    Actually OpenCloud does not require a Web server. Simply use Swing rendering instead of HTML/JSP. Here is a small snippet illustrating a very basic Swing tag cloud using OpenCloud library. It can be improved, but it gives you the gist:

    import java.util.Random;
    
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.SwingUtilities;
    
    import org.mcavallo.opencloud.Cloud;
    import org.mcavallo.opencloud.Tag;
    
    public class TestOpenCloud {
    
        private static final String[] WORDS = { "art", "australia", "baby", "beach", "birthday", "blue", "bw", "california", "canada", "canon",
                "cat", "chicago", "china", "christmas", "city", "dog", "england", "europe", "family", "festival", "flower", "flowers", "food",
                "france", "friends", "fun", "germany", "holiday", "india", "italy", "japan", "london", "me", "mexico", "music", "nature",
                "new", "newyork", "night", "nikon", "nyc", "paris", "park", "party", "people", "portrait", "sanfrancisco", "sky", "snow",
                "spain", "summer", "sunset", "taiwan", "tokyo", "travel", "trip", "uk", "usa", "vacation", "water", "wedding" };
    
        protected void initUI() {
            JFrame frame = new JFrame(TestOpenCloud.class.getSimpleName());
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            JPanel panel = new JPanel();
            Cloud cloud = new Cloud();
            Random random = new Random();
            for (String s : WORDS) {
                for (int i = random.nextInt(50); i > 0; i--) {
                    cloud.addTag(s);
                }
            }
            for (Tag tag : cloud.tags()) {
                final JLabel label = new JLabel(tag.getName());
                label.setOpaque(false);
                label.setFont(label.getFont().deriveFont((float) tag.getWeight() * 10));
                panel.add(label);
            }
            frame.add(panel);
            frame.setSize(800, 600);
            frame.setVisible(true);
        }
    
        public static void main(String[] args) {
            SwingUtilities.invokeLater(new Runnable() {
                @Override
                public void run() {
                    new TestOpenCloud().initUI();
                }
            });
        }
    
    }
    

    This code is based on the Example 1 of the OpenCloud library

    Here is an output of what I got:

    Swing tag cloud demo image

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

Sidebar

Related Questions

I'm looking for a Java library to create block diagrams, which might look as
I'm looking for a Java library that will can take a PDF and create
I'm looking to create a web based application in PHP that receives LDAP requests
I am looking for a library to use that will allow me to create
I am looking to create a C++ library that can be used by both
I am looking for python stubbing library. Something that could be used to create
I'm looking for a library/framework to generate/parse TXT files from/into Java objects. I'm thinking
Just for fun I've been looking at how to use the GD library to
I'm looking for a library or wrapper for Lua to use some cryptographic functions.
I'm looking for a charting library similar to amCharts that allows you to create

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.