java - Netbeans FrameView CenterScreen,ChangeSize -


i modifying java desktop application made using netbeans 6.9.1 . no matter unable change size of main application neither can centralise it.

netbeans uses called frameview extends jframe . no jframe object directly available

what have tried already

this.getframe().setlocationrelative(null); this.getframe().setsize(whatever,whatever); 

above 2 dont work

neither can find option in gui builder

i have feeling question may have been asked have failed find correct answer

alright @madprogrammers hint have come worst possible solution

netbeans view file has class (our application) extends frameview(netbeans native class) . class instantiated in {}app.java file .. class has constructor calls initcomponent() method . on rides properties after constructor has finished (madprogrammers) .. able fix issue writing following code before constructor ended solution works every time have feeling stackoverflow going kill me :)

final jframe f=this.getframe(); runnable r1 = new runnable() {    public void run() {      try {          thread.sleep(200l);          f.setlocationrelativeto(null);      } catch (interruptedexception iex) {}    } }; thread thr1 = new thread(r1); thr1.start();  

Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -