User Profile
Collapse
-
Oh wow! Even I should have been able to catch that one! Thanks alot for the help tho! -
Code doesn't work inside "for" statement
I am new to Java and would greatly appreciate any help. Here is some code I am working on as basically a proof of concept. I am using a "throws FileNot FoundException" . The problem is that when i run the program nothing happens. There are no errors but there is also no output. This same code worked without the "for" statement for just the first number.
Code:Scanner reader = new Scanner(new FileReader("test.txt"));
-
I wasn't getting any errors. I figured out that the problem was the path to the image. I was using the path from the java file but that wasn't where the path should have been from. Thanks for replying tho!Leave a comment:
-
Display Image using ImageIcon and JLabel
Im trying to display a png image by setting it as a ImageIcon and then putting that in a JLabel. I cant get it to display the image. I am using a null layout as it is the simplest way for me to get everything displayed how I want it to be. Here are the snippets of my code that I think are the important parts. Let me know if there is anything else needed to help me. Thanks in advance.
Code:JLabel dice1 = new JLabel(); ImageIcon
No activity results to display
Show More
Leave a comment: