but how? PLease help me!
:(
Printable View
but how? PLease help me!
:(
This is very hard to do... see.... try this class... it makes a huge Textarea... a huge Button and a little little textfield!!!!!!!!
Code:import java.awt.*;
import java.util.*;
public class p extends Frame
{
TextArea txtChat=new TextArea();
TextField txtSend=new TextField();
Button btnSend=new Button("Send Mes");
p()
{
super("hola");
this.resize(100,100);
this.setVisible(true);
con();
}
void con()
{
GridBagLayout gridbag = new GridBagLayout();
GridBagConstraints c = new GridBagConstraints();
setLayout(gridbag);
c.fill = GridBagConstraints.HORIZONTAL;
c.gridx=0;
c.gridy=0;
c.gridwidth=2;
gridbag.setConstraints(txtChat,c);
add(txtChat);
c.gridx=0;
c.gridy=1;
c.gridwidth=1;
gridbag.setConstraints(txtSend,c);
add(txtSend);
c.gridx=1;
c.gridy=1;
gridbag.setConstraints(btnSend,c);
add(btnSend);
txtChat.resize(10,10);
btnSend.setSize(5,5);
}
public static void main(String[] args)
{
p a=new p();
}
}
I think what you would have to do is specify some external padding. (the space between the component and the edges of it's display area.) The value is specified as an Insets Object. By defalut , each component has no external padding.