Hi! I'm new here.
I've been pulling my hair for a week or so, because my teacher of programming can't understand that I have no time to really get into the Java graphics programming. I'm good at programming in C++ and C# but not Java. He set us the deadline of 1 week (I'm already 4 days late) but he made an exception for me and I have to send him the completed project on friday. I'm working on a few projects at the moment, many of which have much closer deadlines than this one (a few for tomorrow, the others for the day after tomorrow). My assignment is to write a graphical application with which a user can draw linear (f(x)=a*x+n), square (f(x)=ax^2+bx+c) ang logarithm function (f(x) = a*log(x)).
I've tried to implement many samples on the internet but with no success. There sould be no complex function parsing. The user inputs only the basic function parameters (a, b, c, n) using a textbox. The main reason is no experience in Java programming (only C# and C++). As I've mentioned before, I'm experiencing a great lack of time so I would very very grateful to people who would be ready to help me out.
I'd rather not put any code here as it's a mess and it doesn't work at all. I've created at least 20 new project (Java Application and Java Desktop Application) which tells you I'm a failure.
Joined: Apr 01, 2009
All I need is just a few pointers really. How should I even start?
With all due respect, seeing that it's Wednesday already, and you won't be able to work on this much until Friday due to other projects, I'd guess that there's no way you can finish this in time. While Java GUIs aren't particularly hard, it's not trivial to write an application with a GUI and custom drawing if you haven't done this before, and aren't experienced with Java to begin with.
It would be different if you were stuck at a specific point, and just needed some guidance on how to make progress with a particular issue, but it sounds as if the problems are all over the place.
My best advice would be to talk to your teacher to see if she's willing to extend the deadline by a week, or otherwise to drop the class.
Actually I made a JFrame with a JPanel and Tabbed Panel (one tab for each function). On each tab there are textboxes and a button (Graph). Now I don't know how to plot a function on this specific JPanel (for example jPanel1).
It does help a little bit. But I don't want to create a new JPanel. I would like to use the existing JPanel on the JFrame. These two examples only show how to override the paintComponent method of a JPanel that will be instanced later. I want to override the paintComponent method of an existing JPanel.