I must start by saying that I'm not entirely sure if this is the right section to post this question.
With that taken care of, now for my question. I am trying to set up a Java Desktop Application using net beans. It requires that I do some drawing; hence, fromsurfing the web, is discovered that most people draw on Jpanels. I am currently trying to draw on a JPanel, but this has proved abortive. 99% of the examples I see online are for Applets, I have tried to extract what I can, but this has not helped me. I have tried using both Graphics, and Graphics2D components, still nothing. Can anyone please rescue me...PLEASE!!!
Benjamin Ugbene wrote: . . . I'm not entirely sure if this is the right section to post this question. . . .
I'm not sure either; I shall move it to our GUIs forum.
Please tell us more details. What happens when you execute your code? What are you planning to draw? Is it drawing in the program or drawing from user input in real-time? Have you got a book? Have you seen the Java™ Tutorials? (There are other Java™ Tutorials sections you may also find useful.
Joined: Sep 29, 2004
Please tell us more details. What happens when you execute your code? What are you planning to draw? Is it drawing in the program or drawing from user input in real-time?
Thanks for your reply. Well for now I am still testing, eventually, the users will set certain parameters, which will be used to draw at run-time as they vary parameters.
Currently when it runs nothing is drawn in the JPanel.
Imho - in 90% if nothing is painted then its problem with layout (but im not sure). I dont like netbeans becouse of little mess with code...
Can you show initComponents() method? (its auto-generated right?)