0 Members and 2 Guests are viewing this topic.
package gamepanel;import javax.swing.*;public class Main { public static void main(String[] args) { JFrame loadingBarFrame = new JFrame(); loadingBarFrame.setSize(400,100); loadingBarFrame.setVisible(true); JProgressBar progressBar = new JProgressBar(); progressBar.setVisible(true); progressBar.setLocation(5,5); progressBar.setSize(1000,1000); progressBar.setValue(0); progressBar.setStringPainted(true); }}
are you sure that it is rendering the screen correctly? you see, if you were using netbeans instead it has a built in editor that lets you actually place the buttons and bars and such manually in a graphical way
Hmmm it seems that you create the progress bar, but it never interacts with the loadingBarFrame. I am not very familiar with swing components, do you need to add it into the frame or whatnot?
Yeah, and I would be careful with just using .add(. In fact, what I do is create what I want in netbeans and study the code for it.Also, Builderboy, you have +256 respect (2^8), and are 17 posts away from 4096 (2^12)
loadingBarFrame.getContentPane().add(progressBar);