اقتباس:
المشاركة الأصلية كتبت بواسطة X_MAN_1S http://www.al79n.com/vb/images/style...s/viewpost.gif
الله يعطيكي العافية
شو في ما في
الله يعافيك
يعني شغل ومع الاهل وزيارات
الحمدلله دراسة ما في
عرض للطباعة
اقتباس:
المشاركة الأصلية كتبت بواسطة X_MAN_1S http://www.al79n.com/vb/images/style...s/viewpost.gif
الله يعطيكي العافية
شو في ما في
الله يعافيك
يعني شغل ومع الاهل وزيارات
الحمدلله دراسة ما في
اقتباس:
المشاركة الأصلية كتبت بواسطة مهدي شطناوي http://www.al79n.com/vb/images/style...s/viewpost.gif
لا امتحاني كان منيييح
بعجبك
بالطشات ..اوقات الامتحانات ... اليوم كان عندي امتحان فاينال وما رحت ...:db465236ff:
الله يقويك يا مان
:db465236ff:
يالله هاذ برنامج لغة الجافا لتصميم واجهه بتجتوي على زر خروج بحيث بس تضغطوا عليه يخرج من الواجهه وزر draw rect ليرسم اكثر من مستطيل بشكل عشوائي في حال الضغط عليها وفي عندكوا خط زنخ بالرسمه كمان تم رسمه بأستعمال كود .. يالله عيشوا وشوفوا هالتخبيص :db465236ff: قسما اشي متعب
كود:/**
كود:
* AWT Sample application
*
* @author
* @version 1.00 09/01/05
*/
import ****x.swing.*;
import ****.awt.*;
import ****.awt.event.ActionListener;
import ****.util.EventListener;
import ****.awt.event.*;
class Bord extends Canvas{
public void paint(Graphics g){
g.drawLine(10,10,60,40);
}
public Bord(){
setSize(200,200);
this.setBackground(Color.green);
this.setForeground(Color.red);
}
public void drawRect(Rect r){
Graphics a=this.getGraphics();
a.setColor(r.getColor());
a.drawRect(r.x,r.y,r.w,r.h);
}
}
class Rect{
public int x,y,w,h;
private Color c;
public void setX(int x){this.x=x;}
public void setY(int y){this.y=y;}
public void setW(int w){this.w=w;}
public void setH(int h){this.h=h;}
public void setRect(int x,int y,int w,int h){
setX(x);
setY(y);
setW(w);
setH(h);
}
public Rect()
{setRect(0,0,0,0);
c=Color.black;
}
public Rect(int x,int y,int w,int h){
setRect(x,y,w,h);
c=Color.black;
}
public void setColor(Color c){
this.c=c;
}
public Color getColor(){
return c;
}
}
public class DrawDemo extends JFrame implements ActionListener {
Bord bord;
Rect r1;
public static void main(String[] args) {
DrawDemo app=new DrawDemo();
app.setSize(500,400);
app.setTitle("Draw Demo Application");
app.set********(200,100);
app.setVisible(true);
app.setDefaultCloseOperation(app.EXIT_ON_CLOSE);
}
public DrawDemo(){
Container c;
c=this.get*******Pane();
JPanel pn=new JPanel(new FlowLayout());
JPanel ps=new JPanel(new FlowLayout());
JButton bDraw=new JButton("Draw Rect");
JButton bExit=new JButton("EXIT");
c.add(pn,"North");
c.add(ps,"South");
ps.add(bExit);
ps.add(bDraw);
bDraw.addActionListener(this);
bExit.addActionListener(this);
bord=new Bord();
pn.add(bord);
}
public void actionPerformed(ActionEvent e){
int x,y,w,h;
x=(int)(Math.random()*200);
y=(int)(Math.random()*200);
w=(int)(Math.random()*50);
h=(int)(Math.random()*50);
int r,g,b;
r=(int)(Math.random()*256);
g=(int)(Math.random()*256);
b=(int)(Math.random()*256);
r1=new Rect(x,y,w,h);
r1.setColor(new Color(r,g,b) );
bord.drawRect(r1);
//---exit---
if(e.getActionCommand().equals("EXIT"))
{System.exit(1);
}
}
}
ههههههههه
كلهم بس شافوا الجافا هربوا
اما ناس:SnipeR (30):
اقتباس:
المشاركة الأصلية كتبت بواسطة shatnawi_king_CS http://www.al79n.com/vb/images/style...s/viewpost.gif
اقتباس:
ههههههههه
كلهم بس شافوا الجافا هربوا
اما ناس:SnipeR (30):
يزلمه حقهم يهربوا..:db465236ff:
الله بعين
شو بدنا نساوي:eh_s(2):
:eh_s(2):
:SnipeR (19):
:SnipeR (30):