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

Popular posts from this blog

apache - setting document root in antoher partition on ubuntu -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -

Process 'command 'F:\android-sdk\build-tools\21.1.2\aapt.exe'' finished with non-zero exit value 1 -