|
java question is it possible to...?? -
December 13th, 2007
is it possible to do a program to have a superclass of the GUI then having the logic and data under it without having much problems?? like
public class CreateGui extends JFrame{
JFrame frame;
private void initClass(String txt){
frame = new JFrame(txt);
}//initClass
public CreateGui(String text){
CreateGui guiClass = new CreateGui(text);
guiClass.initClass();
}//creatgui
}//class
anotherclass
public class DataClass extends CreateGui{
psvm(Strings[] args){
string text = "abcd";
CreateGui up = new CreateGui(text);
}//psvm
}//data class
or is it advisable to do it in reverse, because i was thinking of doing it to separate my gui class and my jdbc connection class
|