Results 1 to 2 of 2
  1. #1
    gyijhbk is offline Member
    Join Date
    Feb 2012
    Posts
    61
    Rep Power
    0

    Default How i can change a variable in the main class from the class with gui?

    How i can change a variable in the main class from the class with gui?

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,985
    Rep Power
    9

    Default Re: How i can change a variable in the main class from the class with gui?

    You need to have a reference to the main class in the gui class, then call a method that modifies the variable.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Similar Threads

  1. change variable value from another class?
    By EStrike in forum New To Java
    Replies: 13
    Last Post: 01-02-2012, 08:32 PM
  2. Replies: 0
    Last Post: 10-23-2011, 10:49 PM
  3. can i listen to variable change in diffrent class
    By gloomy1991 in forum New To Java
    Replies: 2
    Last Post: 01-08-2011, 01:50 AM
  4. How can I change the main class of a project?
    By batya in forum AWT / Swing
    Replies: 2
    Last Post: 11-17-2009, 07:55 PM
  5. Calling a variable from main to another class
    By itsme in forum New To Java
    Replies: 1
    Last Post: 12-18-2007, 03:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •