What Will I Learn?
- We will learn the concept of Event Handle in Java programming
Requirements
-Java Development Kit (JDK) must be installed.
-Also the computer system must have Java IDE installed. Probably Netbeans.
Difficulty
- Intermediate
Tutorial Contents
we are going to learn the events handling in Java programming. Sometime, the users prefer clicking by using the keyboard than using the mouse. The sum operation can be done by entering keyboard below. The code is added is
if(e.getKeyCode()==e.VK_ENTER)
the full code below
private void resultKeyPressed(java.awt.event.KeyEvent evt) {
// TODO add your handling code here:
if(e.getKeyCode()==e.VK_ENTER)
{
int x=Integer.parseInt(data1.getText());
int y=Integer.parseInt(data2.getText());
String z=String.valueOf(x+y);
result.setText(z);
}
}
The result is displayed in picture below
my project is in github
Curriculum
This is my first tutorial about Java programming
Posted on Utopian.io - Rewarding Open Source Contributors
Your contribution cannot be approved because it is not as informative as other contributions. See the Utopian Rules. Contributions need to be informative and descriptive in order to help readers and developers understand them.
My Opinion:
You can contact us on Discord.
[utopian-moderator]
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Hey @portugalcoin, I just gave you a tip for your hard work on moderation. Upvote this comment to support the utopian moderators and increase your future rewards!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Are you a programmer ? , I know just basic Java c c++ ,
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
yes
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
yes
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Congratulations @ighfar! You have completed some achievement on Steemit and have been rewarded with new badge(s) :
Award for the number of upvotes received
Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here
If you no longer want to receive notifications, reply to this comment with the word
STOP
Do not miss the last announcement from @steemitboard!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Congratulations @ighfar! You received a personal award!
Click here to view your Board
Do not miss the last post from @steemitboard:
Vote for @Steemitboard as a witness and get one more award and increased upvotes!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Congratulations @ighfar! You received a personal award!
You can view your badges on your Steem Board and compare to others on the Steem Ranking
Do not miss the last post from @steemitboard:
Vote for @Steemitboard as a witness to get one more award and increased upvotes!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit