This tutorial will teach you how to send the data from one jframe to another Using java.data will be displayed on the second jframe.in the example i am going to teach add two number to calculating the total.the total will be displayed on the second jframe.
paste the code inside the send button
int num1,num2,tot;
num1 = Integer.parseInt(txtno1.getText());
num2 = Integer.parseInt(txtno2.getText());
tot = num1 + num2;
new second(tot).setVisible(true); public class second extends javax.swing.JFrame {
public second() {
initComponents();
}
int total;
second(int tot)
{
initComponents();
this.total = tot;
txttot.setText(String.valueOf(total));
}
What Is the Tesla Pi Phone? Imagine if Tesla, the company that makes famous…
Inventory Management POS systems are now an essential part of modern businesses such as bookshops,…
If you're just beginning to learn Java GUI programming creating an Water System Calculator is a fantastic project for…
GitHub is a powerful tool used by teams and developers around the globe. This guide is…
It's like having a super-smart buddy that is always there to help you write stories,…
The UK is known for its rich history, diverse culture, and most of all its…