Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

So where is your code? What have you tried?

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

I tried your code with one of the demo plots and it worked just fine. Are you setting the series paint colors after you have added all of the series to your dataset?

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Did you try it? Did it work?

-==Zero==- commented: Thanks Sir +2
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

If you insist on using a GUI designer for everything then you'll probably have to use card layout, as efxee mentioned above.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

That's not a question. Ask something comprehensible or stop wasting peoples' time.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

If you have separate panels for each group of controls, you can simply swap those in and out of a target panel that remains in a fixed place in your UI.

To swap them, remove the old panel, add the new, and call targetPanel.revalidate() and targetPanel.repaint().

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

A text editor?

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

I'm not really certain what the question even is. It just sounded vaguely like he was asking for some kind of installer.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

You could use IzPack to create an installer for your program.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Would you like to rephrase that to something comprehensible?

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Who knows? You didn't post the tester class.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Seriously? You resurrected this 2-year-old thread to post that? Did you even bother to read the rest of the posts?

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Fates Warning - Point of View

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Read the docs or forums I suppose. I have no idea if that will allow you to use the Access ODBC driver. Maybe their FAQ will help?

I'll just reiterate my suggestion to use a different database if you want to work on Mac.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

No, Java has no drivers for Access. You are currently using the JDBC/ODBC bridge driver, which allows JDBC connection through a separately installed ODBC driver.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

> do I have to install Access on my mac
You need the ODBC driver for Access. There are third-party vendors that sell them, though I'm not sure if there are any free options available to you.

Maybe you could switch to JavaDB or H2 instead?

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Please elaborate. "Many errors" doesn't give anyone much to work with.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

You didn't post a question.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Continued here: http://www.daniweb.com/software-development/java/threads/385687

Please do not create multiple threads for a single question. Closing this one to forestall two active threads on this.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

What is your specific question?

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

With a null layout, use setLocation() or setBounds().

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Alright, maybe this will clarify a bit:

1) main method must be wrapped into invokeLater()

For concurrency reasons, GUIs should be created on the event dispatch thread. In your main method, you should create your GUI instance in a small Runnable that can be executed on the dispatch thread

javax.swing.SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                new TableFrame();
            }
        });

3) don't call fireXxxXxx outside AbstractTableModel

Your model should fire those events itself as needed when the data changes.

5) don't create/recreate JTable inside Model,

I don't see where your latest code is doing this, so I'm not sure why that was mentioned.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

mKorbel already mentioned a few changes above. If you don't understand some of them, just ask for some clarification.

Personally I would also move the methods that build or update your model data into the model class itself and expose a method like addRow() for your GUI to call when the button is clicked.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

You are updating your local 'data' array in the frame - not the one in your table model.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

HTML is a markup language. It is not a scripting language.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Don't know why another thread was necessary:
http://www.daniweb.com/software-development/c/threads/385432

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

I believe he was referring to the removing and recreating all of your components each time instead of merely updating the data they contain. Update the data in your table model. You don't have to throw everything away.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Has advanced search simply moved or gone away entirely? It looks like search has changed a bit and I can't seem to get to the advanced search screen.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

From your code above, it looks like you're showing the file name in a dialog just before opening

JOptionPane.showMessageDialog(null,outFileNamePDF);

Can you check the read/write permissions on that location?

Netbeans created build and dist folders for the files that it generates. I'm not sure how ownership and permissions are set on those. I've never used Ubuntu in my life, so I couldn't tell you how to check them.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Have you checked the file permission on the location you're showing for 'outFileNamePDF'?

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Folder permissions are the likely culprit. Is the exception giving you any more information?

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Unless you're allowed to use the Math.floor() function, which seems unlikely, you need to keep only the integer portion of your divisions.

In your case of 32/20, you can't use the 0.608 portion, you can only return 1 bill. You can't round it because then you're giving back too much. You must discard the decimal portion of that calculation.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

And the reason is that bills and coins are integer quantities - not floats. Treat them as such.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Consider that bills and coins are not fractional. They are whole integers.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Do the standard IDEs have options that would warn about the condition?

Yes, Netbeans warns you of that.

When do you ever want to shadow a class level variable with a local definition?

No good case for it really comes to mind. It's just likely to cause confusion at the least and hard to spot bugs at worst.

I guess the one exception that is somewhat common is parameters of the same name in constructors, where the local variable is qualified with 'this'.

Why isn't that a warning from the javac.exe program?

No idea.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Post your current code and explain which part you are having trouble with.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

> Am believing that He'll certainly speak through DANIWEB
You'll find a lot of speaking if you use the search feature. There are thousands of "final year project" threads. After you have read them, post back if you have a specific question.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

This thread was happily sleeping in 2007 before Niluk decided to hijack and resurrect it for a completely unrelated question.

I'm going to close it here since I imagine the OP has solved his question.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

It seems pretty obvious from this post that he is irritated that you bailed out of this ongoing thread and started a new one to go in some other direction.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

You could use a math package like javax.vecmath, which has several matrix classes with invert() methods or you can do the math yourself. You can find the math easily on the net.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

> Can someone help me?

Not if you don't ask specific questions.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Glad you got it working.

For future reference, you can right align drawn strings like this

int fahrCol = 40;
String fahrString = (int) farhen + "\u2109";
int fahrStringWidth = g.getFontMetrics().stringWidth(fahrString);
g.drawString(fahrString, fahrCol-fahrStringWidth, row);
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

You can truncate the decimal portion by simply casting the variable to an int

(int)cels

If you want to round, you can use DecimalFormat or the String.format() method.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Agreed. Mine was merely a note on future simplification once he gets the image display issue resolved.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Thank efxee, I just agreed with his/her suggestion. :)

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Unrelated note on the code:
These code blocks only seem to vary by the image offset

BufferedImage img = (BufferedImage) Toolkit.getDefaultToolkit().getImage("Images/image.png");
			character = img.getSubimage ((32 * animationNumber), (32 * offset), 32, 32);
			animationNumber ++;
			if (animationNumber == 4){
				animationNumber = 1;
			}

so you could easily factor out all that repeated code. It's also unlikely that you need (or want) to reload your images constantly as your animation runs.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Nope, wouldn't matter. JPanel, JLabel, or even just an extension of JComponent.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Look at all of the identical code in your if-else cases. The only part of those code blocks that varies is the setColor() call. The rest is executed for every case, so it doesn't need to be in your if() blocks. Don't repeat more code than you need to.

For your 'cel' calc, be careful about mixing integers with float division. 5 and 9 are ints, so consider how that impacts your formula result.

To change the alignment, you'll have to change where you draw the strings. That may involve some calculations on the string lengths as well. You can check this entry in the Java 2D graphics tutorial about measuring text: http://download.oracle.com/javase/tutorial/2d/text/measuringtext.html

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

After you get it to compile, consider that the only part of your code that will be different in all of those if-else cases is the check for which color to use.

You don't need to repeat all that code in each case. Just check the current value of 'faren' and set your color.

Also note that Applets don't use a main() method. Just remove that.