In java2 awt, if i create a button in appletviewer it is always on top default. How to customize the button position.
Awt
Collapse
X
-
Tags: None
-
HiOriginally posted by sriramshreeIn java2 awt, if i create a button in appletviewer it is always on top default. How to customize the button position.
To set a component to a defined position we have to use LayoutManagers.
Some of LayoutManagers are FlowLayout, BorderLayout, GridLayout
each Layout gives you a pre defined setting on the applet. Use appropriate one as per requirement.Comment
-
Dear Sir,
i have used Grid Layout, in that button position is defaultly shown in appletviewer. How set the button for my own position, for example i have to set my button (80,350). Can you give a simple code for that?Comment
-
If you want to position your button to an absolute position (relative to the frameOriginally posted by sriramshreeDear Sir,
i have used Grid Layout, in that button position is defaultly shown in appletviewer. How set the button for my own position, for example i have to set my button (80,350). Can you give a simple code for that?
in which it is stored) you should set the LayoutManager to null; note that this
is considered bad practice.
kind regards,
JosComment
Comment