DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2004

    Java 2d graphic repaint()

    HI i have a problem with my program.
    I need to pass the value from the textfield which is from the ValueInput.java to reflect into the tabbedpane of my LineGraph.java which i think is to repaint() as the LineGraph.java contain a graphic g component.
    But I failed to do that.
    The value of the LineGraph is predefine in the PMGraph2.java.

    please advice on how to pass or parse the value to the LineGraph.java
    Attached Files Attached Files

  2. #2
    Join Date
    Feb 2004
    you make little sense.. surely the LineGraph has a string variable that you can set with some text, and the next time the graph is painted, it uses that text? you dont pass anything using Graphics g.. its not designed for inter-class communication
    The 6th edict:
    "A thing of reference thing can hold either a null thing or a thing to any thing whose thing is assignment compatible with the thing of the thing" - ArchAngel, www.dictionary.com et al.
    JAR tutorial GridBag tutorial Inherited Shapes Inheritance? String.split(); FTP?

  3. #3
    Join Date
    Aug 2004
    The predefined param is set in the PMGraph2.java. When the program is compiled and run, the values is reflected in the LineGraph.java(tabbedPane)
    But i cater another tabbedpane(ValueInput.java) for user to enter the param into the textfield and pass to the LineGraph to be reflected n updated or repaint in the LineGraph.java.
    I just seem unable to do that.
    i still new to java.
    pls Advice... Any help or modification to the code will be greatly appreciated......

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.