java - Issue with GUI - items won't display -
please excuse incompetence, have gained interest programming. i'll try , concise possible.
basically, have written following code:
main: http://pastebin.com/jtqra3tl support: http://pastebin.com/66gg7sk8
problem: jtextfield labeled "item" won't show up? have done wrong? there need add? appreciated, please not bash "code" hard.
problem:
frame.setsize(300,100); frame.setvisible(true); setlayout(new flowlayout()); item = new jtextfield("lorem ipsum ", 10); add(item);
you trying add item after setvisible
true not displaying
solution:
add item first set frame visibility true
frame.setsize(300,100); setlayout(new flowlayout()); item = new jtextfield("lorem ipsum ", 10); add(item); frame.setvisible(true);
Comments
Post a Comment