InstagramTwitterSnapChat


 
وصف

العودة   منتديات سكاو > الكليات الجامعية > منتدى كلية الحاسبات وتقنية المعلومات > منتدى قسم تقنية المعلومات
التسجيل مشاركات اليوم البحث
   
   


مساعده في الجرافيكس

منتدى قسم تقنية المعلومات

 
 
أدوات الموضوع إبحث في الموضوع انواع عرض الموضوع
منتديات طلاب وطالبات جامعة الملك عبد العزيز منتديات طلاب وطالبات جامعة الملك عبد العزيز
قديم 09-03-2011, 07:40 PM   #3

رهين لحظة

جامعي

 
تاريخ التسجيل: Aug 2010
التخصص: تقنية المعلومات
نوع الدراسة: إنتظام
المستوى: السابع
الجنس: ذكر
المشاركات: 95
افتراضي رد: مساعده في الجرافيكس

هذا كود بسيط سويته ع الطاير . مو البرنامج كامل .. لكن ان شاء الله انه يفيدك
سويت لك 2 تيكست فيلدز . واليوزر راح يدخل قيم .. واول ما يضغط على البوتوم
راح يطلع له القيم اللي دخلها في الآت بوت .
إنتي عدلي عليه وبتوصلين لحلك ان شاء الله .. :)
مع تمنيااتي لك بالتوفيق

كود PHP:
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package grahpics;
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;
/
 *
 * @
author IPM
 
*/
public class 
Main {

    /
     * @
param args the command line arguments
     
*/
      static 
JTextField t=new JTextField(5);
     static  
JTextField  t2=new JTextField(5);
    public static 
void main(String[] args) {
        {

            
JFrame a = new JFrame();
            
a.setLayout(null);

        
JLabel l=new JLabel("First Coor : ");
        
JLabel l2=new JLabel("   second Coor : ");
      
        
a.add(l);

         
Container content a.getContentPane();
         
content.setLayout(new FlowLayout());

        
a.add(t);
        
a.add(l2);
        
a.add(t2);
       

        
a.setSize(350400);

       
content.setBackground(Color.white);
       
    
      
JButton b0= new JButton("Draw");


      
ActionListener al = new ActionListener() {
   public 
void actionPerformed(ActionEvent e) {
            
String command e.getActionCommand();
            if(
command.equals("Draw")) {
              
System.out.print("You have pressed Drawing Button");
                      if(!
t.getText().equals("")){
        
int first_coor=Integer.valueOf(t.getText());
        
System.out.print("\nThe first Coor : "+first_coor);
        }
     
                if(!
t2.getText().equals("")){
              
int second_coor=Integer.valueOf(t2.getText());
              
System.out.print("\nThe second coor : "+second_coor);
        }

            }
          }
      };

       
content.add(b0);
        
b0.addActionListener(al);
    
b0.setActionCommand("Draw");


       
a.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
       
a.setVisible(true);

    }

}

اوه توي انتبه انك هلالية ^_^ .. بس مو مشكلة ان شاء الله بكرة نكسر روسكم :p

 


التعديل الأخير تم بواسطة رهين لحظة ; 09-03-2011 الساعة 07:47 PM.
رهين لحظة غير متواجد حالياً   رد مع اقتباس
 

 


تعليمات المشاركة
لا تستطيع إضافة مواضيع جديدة
لا تستطيع الرد على المواضيع
لا تستطيع إرفاق ملفات
لا تستطيع تعديل مشاركاتك

BB code is متاحة
كود [IMG] متاحة
كود HTML معطلة

الانتقال السريع

 


الساعة الآن 10:45 PM


Powered by vBulletin® Version 3.8.9 Beta 3
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Ads Organizer 3.0.3 by Analytics - Distance Education

أن كل ما ينشر في المنتدى لا يمثل رأي الإدارة وانما يمثل رأي أصحابها

جميع الحقوق محفوظة لشبكة سكاو

2003-2025