السلام عليكــم ورحمـة الله وبركاتــه ،،
اخواني وخواتي الكرام
عندي هذا الكلاس اخته من موضوع شخص في المنتدى
=======================================
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Jframe extends JFrame {
private JButton initialzingArray, Total,TotalCoursM,CalculatSGPA,printResult;
private Container container;
private FlowLayout layout;
public Jframe()
{
super( "Jframe" );
layout = new FlowLayout();
container = getContentPane();
container.setLayout( layout );
initialzingArray = new JButton( "initialzingArray" );
initialzingArray.addActionListener ( new ActionListener (){
public void actionPerformed (ActionEvent initialzingArray ){
// call the method that actually add the product to the database here ...
// and the other buttons need a code like this , good luck :)
}
});
container.add( initialzingArray );
Total = new JButton( "Total" );
container.add( Total );
TotalCoursM = new JButton( "TotalCoursM" );
container.add( TotalCoursM );
CalculatSGPA = new JButton( "CalculatSGPA" );
container.add( CalculatSGPA );
printResult = new JButton("printResult");
container.add( printResult );
setSize( 700, 120 );
setVisible( true );
}
public static void main( String args[] )
{
Jframe application = new Jframe();
application.setDefaultCloseOperation(
JFrame.EXIT_ON_CLOSE );
}
}====================
بالنسبة لهذا السطر
=====================
initialzingArray = new JButton( "initialzingArray" );
// my code here //
initialzingArray.addActionListener ( new ActionListener (){
public void actionPerformed (ActionEvent initialzingArray ){
// call the method that actually add the product to the database here ...
// and the other buttons need a code like this , good luck :)
========================
ابغا هذا الزر يتصل بميثود في كلاس اسمه
StudentApp
واسم الميثود الي ابغاه يتصل بها اسمها
initialzingArray
انتظر ردكم
بالتوفيق
