Java swing GUI tutorial #19: BoxLayout

preview_player
Показать описание
BoxLayout is a useful layout manager for positioning your components verticaly. If you have any question leave it in comment section below.
Рекомендации по теме
Комментарии
Автор

Very nice tutorial. Clear, easy-to-understand demonstration. Better than many tutorials I've been seeing. Will subcribe.

jochim
Автор

very helpful thankyou! I love how you go through everything and explain what everything means without assuming that I know it.

sshookum
Автор

Thanks for this video. I was really struggling with this but you are video was very helpful

afifkhaja
Автор

short and understandable tutorial... Great !!

sviatoslavnaida
Автор

i want to work in it hub for great learning in silicon valley can any one help me

haffizbilal
Автор

in these days can java developer get us visa for job

haffizbilal
Автор

thank you so much!! very good and simple explanation

andreapaz
Автор

public BoxLayout(){
panel.setLayout(new BoxLayout(panel, BoxLayout.PAGE_AXIS));
}

When i try to uses this code my IDE gives a error messages with the PAGE_AXIS because it can't find the symbol? But i have everything you have and extra.

This is the full code:

package boxlayout;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;


public class BoxLayout {

JFrame frame = new JFrame("BoxLayout");
JPanel panel = new JPanel();
JButton Button1 = new JButton("1"), Button2 = new JButton("2");

public BoxLayout(){
panel.setLayout(new BoxLayout(panel, BoxLayout.PAGE_AXIS));
}

public static void main(String[] args) {



}
}

wertin
Автор

It gives me multiple errors when i try to use boxlayout for my jframe...whats the problem??

trollerninja
Автор

Why does every single aspect of Java have to be such a massive pain in the ass?

jaybartgis
Автор

disliked. add some commentary next time

alantao
join shbcf.ru