I am extending JPanel and placing my GUI components into my application. As it stands- i have a title at the top- in the middle i have an image (really its a background image)- and then at the bottom i have a JButton.
To insert these in- i have
setPreferredSize(new Dimension(800- 590));
setLayout(new BorderLayout());
add(titlePanel- BorderLayout.NORTH);
JPanel pan = new JPanel(new FlowLayout());
registErJButton.setPreferredSize(new Dimension(200-50));
pan.add(registErJButton);
add(pan- BorderLayout.SOUTH);
Obviously the image is in the background but the main portion takes up the center og the page. How do i add another JButton just above the one i have? The one i have is set to SOUTH and i cant seem to place my new one right baove this.
i have tried everything i can think of and my applets just wont work on my website- instead they always display a red x
url: www.csce.uark.edu/~relswort
maybe i missed a step. i have written/downloaded .CLASS files and then i move them over to my directory where my index.htm file is. lastly i add the <applet> part of the html and i thought that was all i had to do- is there more to it? thank you!
*added on codebase to the applet html and put the .CLASS files into a folder as suggested by someone on here and unfortunately is still doesnt work*
A Java program would be fine too.
I download JAVA- the latest version but when I am trying to play yahoo games like backgammon- the pop up massage is showing "java runtime error can not be loaded". What sould I do?
Is there a way to convert all the parts of an array together to form a long?
For example
x[0]=5
x[1]=4
x[2]=3
I want to convert it all to be a long that looks like
long y=543
No comments:
Post a Comment