java - Focus to previous jframe -
i creating supermarket billing application.when user press enter on product text field new frame table come. can select particular product , press enter on selected row , previous frame should come old values. tried various tricks focus not coming first frame.
for(frame frame : frame.getframes()){ if(frame.gettitle().equals("welcome")){ system.out.println("frame located"); welcome w=(welcome) frame; w.setfields(code, name, rate); w.setvisible(true); } }
i solved problem. tofront() method helps focus frame
Comments
Post a Comment