[JAVA] How to move another class with a button action of another class.

The contents of the button event

public void actionPerformed(ActionEvent e){
           a.kae();
  }

And make another class.

class a{
	public int test = 0;

	public void kae(){
		test=1;
		if(test==1){
			System.out.println("success");}
	}
}

Anyway, when a button event happens The value of class a changes and it passes if.

Recommended Posts

How to move another class with a button action of another class.
How to use a foreign key with FactoryBot ~ Another solution
Mapping to a class with a value object in How to MyBatis
How to find out the Java version of a compiled class file
[Java] How to get to the front of a specific string using the String class
How to create a class that inherits class information
How to convert a solidity contract to a Java contract class
[Rails] How to create a Twitter share button
How to get the ID of a user authenticated with Firebase in Swift
How to convert a value of a different type and assign it to another variable
How to test a class that handles application.properties with SpringBoot (request: pointed out)
[Java] How to use compareTo method of Date class
How to change the action with multiple submit buttons
How to make a factory with a model with polymorphic association
How to delete a new_record object built with Rails
How to manually generate a JWT with Rails Knock
How to launch another command in a Ruby program
How to boot by environment with Spring Boot of Maven
How to get started with creating a Rails app
How to enable submit button every time with jquery
[Java] How to start a new line with StringBuilder
(Java) How to implement equals () for a class with value elements added by inheritance
[ruby] How to assign a value to a hash by referring to the value and key of another hash
[Docker] How to see the contents of Volumes. Start a container with root privileges.
How to place a button that does not move by scrolling on TableView etc.
How to take a screenshot with the Android Studio emulator
How to request a CSV file as JSON with jMeter
How to use trained model of tensorflow2.0 with Kotlin / Java
How to divide a two-dimensional array into four with ruby
Port C code with a lot of typecasts to Swift
How to leave a comment
Learning Ruby with AtCoder 13 How to make a two-dimensional array
How to Burning a Install Disk of Windows from Ubuntu
How to test a private method with RSpec for yourself
A story addicted to toString () of Interface proxied with JdkDynamicAopProxy
A series of steps to create portfolio deliverables with Rails
[Ruby] How to retrieve the contents of a double hash
Build a Node-RED environment with Docker to move and understand
How to mock some methods of the class under test
[jsoup] How to get the full amount of a document
How to insert a video
How to set up a proxy with authentication in Feign
How to create a method
How to register as a customer with Square using Tomcat
How to deal with different versions of rbenv and Ruby
I tried to express the result of before and after of Date class with a number line
Try to imitate the idea of a two-dimensional array with a one-dimensional array
I want to make a button with a line break with link_to [Note]
How to cancel cell merging within a specified range with POI
How to make a jar file with no dependencies in Maven
A story of connecting to a CentOS 8 server with an old Ansible
How to rename a model with foreign key constraints in Rails
How to output a list of strings in JSF as comma-separated strings
How to open a script file from Ubuntu with VS code
How to think about class design (division) in a business system (1)
[chown] How to change the owner of a file or directory
How to build a little tricky with dynamic SQL query generation
How to check for the contents of a java fixed-length string
How to realize huge file upload with Rest Template of Spring
How to scroll horizontally with ScrollView
How to add columns to a table