I have created a "Savings Account" so to speak and I need to be able to read the balance from a file I have called balance.txt The file is formatted like this
******************************
...
Type: Posts; User: lanmonster
I have created a "Savings Account" so to speak and I need to be able to read the balance from a file I have called balance.txt The file is formatted like this
******************************
...
Thanks again for your help!
Awesome. With your help, I got every button to work. Is it possible to have greyed out text in the JTextField?
Amt is defined in the SavingsGUI method of class SavingsGUI.
action listeners set. where do I put the commands for what they need to do?
See above post. Everything is laid out how I like it but the buttons don't do anything yet. I am eternally grateful to you for your kind service. Thank you for helping!
JFrame dep = new JFrame("Deposit Amount");
JPanel btn = new JPanel();
btn.setVisible(true);
btn.setLayout(new GridLayout(4,3,10,10));
JTextField depAmt = new JTextField("$***0.00",...
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: adding a window to a container
at java.awt.Container.checkNotAWindow(Container.java:439)
at...
I have the borderlayout set up but I am back to only one button showing. Nothing else. It is the last button added to dep that is showing.
JFrame dep = new JFrame("Deposit Amount");
JTextField...
nvm. I googled different layoutmanagers and found gridlayout.
--- Update ---
I want to put a JTextField above the buttons in dep and wit that displays the amount. When a button is pressed, it ...
dep.setLayout....
*facepalm*
now the buttons are all in a line. I would like to see them in a grid format 3(columns)x4(rows). How do I make this happen? Is it a different layout?
The last one. I used FlowLayout()
Rewrite. Now, the frame that appears when the deposit button is clicked just shows one button when it should show 12.
I thought GUI gooey = new GUI(); was the constructor.
when I try to call that method, an error is returned. something about it cannot be called in a static situation because it is not static.
I...
Sorry. When I run it, nothing shows up but the println to the terminal. The gui part does not appear.
Hello, I am not a newbie in the sense that I just started but it has been a while since I have done any programming. I am making a "Savings account" program and I am having trouble with the GUI. What...
I got it figured out! Now on to problem 2...
Thanks
I am using Project Euler to test myself on the Java programming that I am teaching myself and here is problem one: If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3,...
Here is a little program I wrote to help me memorize my student ID #. I will * out the actual number but here is my code.
import java.util.Scanner;
class baylorID {
public static void...
*derp* got mixed up. They do for statements like that, which is probably the right way to do it. I have not learned the for statement yet. My bad :P
I am in a computer science academic event and in the practice tests, they give a code fragment and ask what the output will be. I know that the if statement can be notated like:
if (someBoolean){...
Got it! Now I just have to get it GUI'd up and I'll be all done!
one last question. I need to make it where when I can go back to the point where I make the decision to view stats or deposit. How do I do this?
Sorry if I am getting on your nerves. I certainly am not trying to. Java program write to file please.