Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

awt에서 버튼크기를..

616 views
Skip to first unread message

유병수

unread,
Jul 3, 2002, 8:05:23 PM7/3/02
to
크게할려는데..

어떻게 해야할지..

소스입니다.

import java.awt.*;
public class btn
{
public static void main(String[] args)
{
Frame myf=new Frame("버튼이당");
myf.setSize(200,200);
myf.setBounds(100,100,300,300);
Button myb1=new Button("첫번째버튼");
Button myb2=new Button("두번째버튼");

Label l1=new Label("작살");

myf.add(myb1,BorderLayout.NORTH);
myf.add(myb2,BorderLayout.SOUTH);
myf.add(l1,BorderLayout.CENTER);


myf.setVisible(true);
}
}


JinYoung

unread,
Jul 5, 2002, 12:21:50 AM7/5/02
to
Layout을 BorderLayout 으로 하시면 버튼크기를 특별히 지정할 수 없습니다..
어차피 폼의 크기에 따라서 크기가 맟춰지니 말입니다..
버튼에 setMargin 메소드를 이용해 좌,우,위,아래 여백을 지정해주는 방법이
있습니다..

"유병수" <happyw...@hosanna.net> wrote in message
news:ag02bn$jai$1...@news1.kornet.net...

0 new messages