Very frustrated with this one... I was simply typing in a JOptionPane message box then all the sudden the two singleton classes I created and use in quite a few areas are marked as errors in my whole project? I removed the JOptionPane and it still says the errors everywhere in all my classes...
It's almost like it can't see it in the package. Some of the classes that use them are in the same package and they show error's as well.
I don't know what to do to fix this but I have a deadline in two day's to get something working out and I cannot with this. I have compiled and used it several several times and everything was fine so I dunno what is going on.
Any help would be appreciated.
Ok so it's not just the singleton's any of the classes that I have in other packages that I am calling from other packages are also doing the same thing:
These are also error's shown and I didn't change anything that should have done all this...
Great explination and thank you for taking the time in guideing me in the right direction when testing and trying to find the problem areas. I will in the future plan to do this with any recommendations I recieve.
I did try your two line solution and when I used that it never went to the next component and just inserted a tab into the JTextPane so then I wrote the code mentioned earlier to get it to work. I'm not sure what the differences are but the two line solution did not resolve the issue.
This may be something simple but I cannot seem to figure out how to make the tab key stop tabbing (ie. putting spaces) inside of a JTextPane. I do have it tabbing to the other componenets by setting up a FocusPolicy class and FocusPolicy Keys but it still adds the space in the JTextPane even though it tabs out.
Tony. Thank you for your response as that is what I thought I could have done with the DND library but since I am a beginner (even though I have went through every tutorial I could find) it has eluded me. For example:
This code is located in the drop method of the recieving JPanel.
And the code for the Person being dragged I used the following to create the DataFlavor:
It would execute without errors which I was happy about but the person object created from the dataflavor was always a new person as I believe from the following line did that:
So after a very long time I decided that it was too restrictive to do what I needed which was probably the wrong decision but I had nothing else to go on. I wished I could have found a good example or something simalier that would just transfer a component using dnd instead of just creating a new one each time. There may be something like that out there but I could not find it.
Paul I would love to if I understood what your talking about. I'm not sure how to accomplish that.
Thanks again everyone and I know a lot of folks are probably shaking their heads at me but I really want to understand it.
Thanks all for the replies. I was able to achive what I wanted by removing all of the components and re-adding them back to the same JPanel then calling revalidate() made it work very nicely. I will experiment with the setconstraints as that sounds like a cleaner way of doing this.
Tony I apologies if I had not been clear with my goal. I am (trying) to write a manning tool to visually assign personnel to work. I need it to be drag and drop oriented instead of a data entry screen. The overall goal is when you drag a person and drop them somewhere it will put the person there and make the change in the database so reports and other items can be ran off of that data.
So the tool is just an interface for meeting needs by assigning personnel and keeping track of those changes and assignments.
Does that make sense? Is that what you were asking about?