venkatesh mamidipelli wrote:i want to create a cross platform app using java any suggessions??
Alicia Perry wrote:
Ulf Dittmer wrote:Welcome to the Ranch.
Ugh, NetBeans-created Swing code is the worst. The problem is that the getResource approach will only load the resource once per lifetime of the JVM. If the file changes you need to read it via file operations, most easily using the javax.imageio.ImageIO.read methods.
Thank you! So if I write the code without using NetBeans builder what should I write?
it is enough if I create a label and associate an image or should I use other functions?
Paul Clapham wrote:I don't know what's wrong with your code because you didn't tell us. What makes you think it doesn't work? Or to put it another way, what evidence can you tell us about?
In the meantime I'm going to guess that you named a method "keyRealesed" and when you try to call the keyReleased method nothing happens because it doesn't exist. Or it doesn't compile for that reason.
Claude Moore wrote:Danny, thank you for sharing your solution with us, I'm glad you managed it. About java.awt.Robot, from docs it seems that authors wrote it with automatic-testing of Gui in mind.. maybe they limited it to generate events jre is able to handle...