java - How to go from jinternalform to another jinternalform -
in java swing project i'm using jframe form named home. acully home page linked other jinternalframe forms. have made 1 jinternalform frame named invoice. , put button damageitem. when i'm click button want go jinternalform frame called stock. how can link that. made object of stock.
stock st = new stock();
but still can't use method use in home call stock. like. .
stock st = new stock(); jdesktoppane1.add(st);
and changed jinternalframe's variable modifier "public"
.
but still can't use it. how can call 1 jinternalframe form another.
i'm using netbeans 7.3
i not 100% sure question if you're trying achieve interact between 2 jinternalframes, should consider looking @ mvc pattern (wikipedia link)
you have view, jframe owns 2 jinternalframes. these jinternalframes have view elements, jbuttons. invoke external controller each time 1 of these buttons invoked whichever action wish do. ideally, have model (logical entity) displayed views , act on model within controller. it's hard resume of in few lines should take time read documentation , tutorials on programming paradigm. there stackoverflow threads this. mvc links
Comments
Post a Comment