الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

كود لايعمل الرجاء المساعده

مغلق
بدأه qqq في 31 ديسمبر 2002 · 7 رد · 869 مشاهدة · في JavaSE
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

الرجاء المساعدة الكود الخاص بالسحب(withdraw)لايعمل ارجو ممن يستطيع ان يشغله ثم ينشره هنا له الف شكر

bank.zip

#2

بسم الله الرحمن الرحيم

مرحبا (f) qqq (f)

الخطأ بسيط جدا و هو فى ملف Application.java

فمن الملاحظ انك اعلنت عن متغير أسمه customersReportButton و هو من نوع JButton ولكنك سهوت عن انشائه بالأمر new :D

فالكود الذى به خطأ كالتالى

private class ControlPanel extends JPanel

	{

	JButton openAccountButton,withdrawButton;

	JButton customersReportButton;

	JButton exitButton;

	public ControlPanel() {

  openAccountButton = new JButton("Open Account");

  openAccountButton.addActionListener(

 	 new ActionListener(){

 	 public void actionPerformed(ActionEvent e){

    mainPanel = new OpenAccountPanel(bank);

    contentPane.add(mainPanel, BorderLayout.CENTER);

    contentPane.validate();

  }

	}

     	 );

	add(openAccountButton);

	withdrawButton = new JButton("Withdraw Money");



	customersReportButton.addActionListener(

 	 new ActionListener(){

 	 public void actionPerformed(ActionEvent e){

//    Panel2 = new WithdrawPanel(bank);

//    contentPane.add(Panel2 , BorderLayout.CENTER);

//    contentPane.validate();

  }

	}

و لتصحيحه اضف الأمر التالى بعد الأعلان عن customersReportButton

customersReportButton = new JButton();

خالد المصرى

#3

اخي خالد المصري اشكرك جزيل الشكر لكني حاولت وعملت بما تقول ونفس الخطا يتكرر والخطا.وهو في الملف withdraw.java :(.ارجو يأخ خالد اذا البرنامج اشتغل عندك ان تنشره هنا لاني محتاجه جدا جدا ولك مني جزيل الشكر

#4

In addition to the error mentioned by brother Khaled ,There is an error in Withdraw class but to fix it ,u need to add an empty constructor to the base class Account

add this to Account.java

public Account() {}

and also add the static method withdraw

public static void readWithdraw(long B)
	{

	}

Hope this helps

Madani

#5

Mr : madani

thank you very much but where the palce of the code exactly because i tried to put it some where but the same error appear again

can you show me the code after correction

#6

.

new_folder.zip

#7

thank you very much Mr madani to help me

again thank you and for Mr kaled almasri

:D:D:D:D:D:D:D:D:D:D:D:D

#8

the program is ok but the withdraw button when i pressed on does'nt work can you check it again Mr madani

thankyou

هذا الموضوع مغلق.

مواضيع مشابهة