Results 1 to 1 of 1
- 05-20-2011, 12:07 PM #1
Member
- Join Date
- Jan 2011
- Posts
- 2
- Rep Power
- 0
In JFace Application window cant able to enable two button at startup only
Hi,
Here is my code..
class sample extends ApplicationWindow
{
protected Control createContents(Composite parent)
{
Composite composite = new Composite(parent, SWT.NULL | SWT.APPLICATION_MODAL);//
composite.setLayout(null);
composite.setSize(330, 250);
btn1 = new Button(composite, SWT.PUSH);
btn1.setFont(fontForm);
btn1.setText("Hai");
btn1.setBounds(20, 180, 110, 30);
btn1.setEnabled(true);
btn2 = new Button(composite, SWT.PUSH);
btn2.setFont(fontForm);
btn2.setText("Hai");
btn2.setBounds(20, 180, 110, 30);
btn2.setEnabled(true);
}
public static void main(String[] args)
{
ApplicationWindow window = new sample(Shell);
window.setBlockOnOpen(true);
window.open();
}
}
meanwhile the code has some labels,text fiels which i didnt show up here..
wen i am trying to execute the above code the empty window is coming up
if any of btn.setenabled is made to false i am able to see all field in window normally
again if through some text field listner if i enable the button i am able to do so..
i dont know why i am not able t enable two button at launch of application ???
i am running this in eclipse 3.6.2(Helios).please help..
Similar Threads
-
Set enable Button (in main panel) from internal frame
By Lisyandi in forum NetBeansReplies: 7Last Post: 04-03-2011, 12:35 PM -
Please help : JSP enable/disable button
By kalyana in forum New To JavaReplies: 3Last Post: 03-24-2011, 05:06 PM -
Login window before application startup
By Gloomy in forum AWT / SwingReplies: 5Last Post: 07-19-2010, 09:22 PM -
webcam application startup
By Bharat in forum New To JavaReplies: 7Last Post: 01-19-2009, 05:24 AM -
JFace Window
By Java Tip in forum SWTReplies: 0Last Post: 07-02-2008, 08:12 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks