DateFormat is a the parent class of SimpleDateFormat. If you are using SimpleDateFormat, you should not need a DateFormat object as well (at least not for your purposes).
You are receiving the...
Type: Posts; User: aussiemcgr
DateFormat is a the parent class of SimpleDateFormat. If you are using SimpleDateFormat, you should not need a DateFormat object as well (at least not for your purposes).
You are receiving the...
Your scroll panel has a fixed size, as does your member panel. Your member panel is inside your scroll panel. The scroll bars will only show up if the member panel's size exceeds the scroll panel's...
Like with the custom ActionListener. In the MembersActionListener (the last one I posted), we passed a Members object in the constructor, which we used to set a variable in the class instance.
...
The easiest way would be to add a variable in your membersActionListener class like this:
public MainFrame mainFrame;
And then set the variable (either by passing the value in constructor like...
In the abstract action listener, you do not need to return anything from the method. You just declare it with the abstract keyword: protected abstract Members getMembers();
Also, I realized a...
It is entirely up to you. I think the way I suggested would remove the need for the you to figure out which button goes with which user (since that would be set when you add the action listener to...
I don't understand. Are the buttons not responding?
The more I look at this, the more I think this is not the "best" way of going about it. Considering your needs, perhaps you should not be trying...
Did you try revalidating the entire panel?
I assume the JLabel's text are set after the frame has been created? If so, that is because the text of JLabels is not dynamic. You can change it, but you need to include a call to...
I'm a little surprised the compiler lets you do this, but you have a typo:
int index = membersList.lastIndexOf(membersList);
If an object cannot be found in a list, it returns -1 as the index...
Ok. Well first of all, we need to change this:
JFrame frame = new JFrame();
JDialog dialog1 = new JDialog();
JDialog dialog2 = new JDialog();
Back to this:
JFrame frame = null;
...
When is that call made?
Wait. You never call createGUI(), do you?
That would be why dialog and frame were null many posts ago. You never initialized them.
You can ignore the warning.
Those lines do not print? Neither of them? That would mean that the dialog's .dispose() method is not being called.
Go back to this code and try something:
int...
Ok, we are going to get drastic.
We need to figure out what is happening. We want to see:
1. If the dispose method is called
2. If the dispose method ends
You could use a debugger if you know...
That is not how the while loop would operate. In reality, it locks up the thread it is running on, since it runs forever and never moves on. An infinite loop is really only arguably needed if you are...
Why are you doing this in a while loop?
while(true)
{
if(this.done == true)
{
return this.newMember;
...
If the null pointer was resolved by using the default constructors instead of the other constructors, this is probably not a good sign.
Are you able to post the entire code for that class?
I thought you said you were getting a null pointer exception (back at post #38).
Put a print statement inside the if statement for those calls. Perhaps the if statement is never being entered in the...
If you are receiving null pointer exceptions after initializing them, you'll need to post the full stack-trace of the error message.
Perhaps check does not equal 0.
That's not odd. Static methods do not require an initialized instance of an object in order to work.
In case you do not know what "static" does, making a class variable static makes the variable...
Ok, so in the constructor of your MainFrame class, initialize it with the constructor of the memberFrame class. If you have not created a constructor in the memberFrame class, you can just use the...
Why do you have the second MemberFrame variable? And do you ever actually initialize your memberFrame object (call it's constructor)?
I don't exactly understand what you did. Can you post your MainFrame class? If it is too large, just post the sections were you mention MemberFrame.
createGUI() does not need to be static. You need to invoke the createGUI() method on a MemberFrame object.
For example, I assume somewhere in your MainFrame class, you created a MemberFrame object...