No... No... There's no way I could have done that... Wow. I can't believe the absolute stupidity of what I did. I just can't believe it. Well, great. Thanks for the help though!
Type: Posts; User: JamEngulfer221
No... No... There's no way I could have done that... Wow. I can't believe the absolute stupidity of what I did. I just can't believe it. Well, great. Thanks for the help though!
I am making something that turns a string into an Integer if it is an Integer, or keeps it as a String if it is a String. I have that bit working fine, it is just when I try and check to see what the...
Ok. I was using Eclipse to do this and it turns out I didn't actually select runnable Jar file, just ordinary jar file. That was why it wasn't working. Thanks for the help though!
So, I was trying to run a Jar I compiled and this "Failed to load Main-Class manifest attribute from
text.jar" Came up. I looked up the issue and tried to fix the Manifest, however whatever I try...
By the way, that code was in addition to the mainClass class code I posted earlier.
I'll post the updated code that is in one large lump so it's easy to see. I have stepped through the code and as far as I can see, it is in the right order.
Edited guiMain code:
import...
I got it so that it only runs once, but now the buttons don't appear for some reason. I've had a look and the code is in the same order as before, just in one method for simplicity.
Well, everything seems to actually be loading. Something I noticed that may be something was that mainGui was actually being called twice. Once by mainClass and once in populateWindow();
Hopefully only one
Oh, ok. Sorry, I thought you wanted the compiled file xD.
mainClass.java:
public class mainClass {
static mainGui mgui = new mainGui();
Edited my post whilst you were replying. It should be there.
Oh, did you want the actual program + source code? And I'm sorry, that isn't the entire source code, just the parts of it that were relevant to the problem.
I'm posting a link to a .zip file that...
It doesn't appear to be called, so that is probably the problem. I'm wondering what code I need to add in, as I have looked on a few tutorials and my code appears to be no different.
What I have is a basic window with 2 buttons on it: Get Values and Start. When the 'get values' button is clicked, I want the getInput(); method to run, causing 2 pop up windows to appear, asking for...
How tricky would it be to have, in Java, a 2D 'blob' of water that warped any images/background behind it and was resizable/grew and shrunk.
This seems quite complicated to do to me, I was...
I read the article, and I am still confused. I had a look around the code, changed some of mine and still nothing. I simply can't figure out how I get it to work. Is there something hugely obvious I...
I added a println, and it wasn't being called.
How would you suggest I call it, I am new to stuff like this :)
Oh, ok. Sorry. Posting code now.
any help would be appreciated
I don't know what is causing this, but what happens, is that my window appears, but my drawString(); doesn't appear and show the text. No errors or anything.
import java.awt.Graphics;
import...
So, in that case, what do I actually do to get my paint() to work then?
So, in that case, what do I actually do to get my paint() to run/work?
I changed it so that it uses paint(Graphics g){
}
No, It still throws up the NullPointerException. And I don't know what to do to solve it.
Ah, yes. That was on purpose, it was the only thing I could do that didn't make Eclipse throw out an error. (in the form of a red line)