Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.awt.BorderLayout;

import javax.swing.JFrame;
import javax.swing.JProgressBar;

public class Main {
    public static void main(String args[]) throws Exception {
        JFrame frame = new JFrame("ProgressBars");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        JProgressBar dJProgressBar = new JProgressBar();
        dJProgressBar.setValue(100);
        dJProgressBar.setBorderPainted(false);
        dJProgressBar.setString("Ack");
        dJProgressBar.setStringPainted(true);

        frame.add(dJProgressBar, BorderLayout.WEST);
        frame.setSize(300, 200);
        frame.setVisible(true);
    }

}