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

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

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