« first day (2226 days earlier)      last day (202 days later) » 

11:36 AM
i have a dialog box in which there is a txtfield which is user input..when the user input the text and click ok another dialog box appears where the user input txt should be there but when i run it the txtfield in the 2nd dialog box is empty



//1st java class
private void btn_okActionPerformed(java.awt.event.ActionEvent evt) {
String txtfield=txtadd.getText();
JFrame frame = (JFrame) SwingUtilities.getWindowAncestor(this);
File fsdb=new File(frame, true);
fsdb.settxt=txt.getText();
fsdb.setLocationRelativeTo(null);
noneditabletxt.setText(settxt);
}
 
 
5 hours later…
4:51 PM
@Fawkes Whenever you have code to post, if it is longer than 1 or 2 lines go to hastebin.com, make a link, then post it here
@Fawkes I'm also fairly certain that you are instantiating your File incorrectly. docs.oracle.com/javase/8/docs/api/java/io/File.html
 

« first day (2226 days earlier)      last day (202 days later) »