Programlama | Programlama Dilleri | C Programlama Dili |C++



Fonksiyonel Pencere Düzenleme

Netbeans platformunda yap?lan proje sayesinde kullan?c?dan al?nan say?n?n okunmas?n? sa?lamaktad?r. Dist klasorü içindeki "JavaApplication3.jar" uzant?l? dosya çal??t?r?larak sistem ba??ms?z program çal??t?r?labilir.

Program ile birlikte farkl? iki GridLayout düzeni pencereye aktar?l?r.

Program?n Tamam?n? A?a??daki Linkten ?ndirebilirsiniz

Linki Görebilmeniz ?çin Üye Olman?z Gerekmektedir...

Üye Kay?t

Program Kodu:

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

 
package javaapplication3;
 
import java.awt.Container;
import java.awt.FlowLayout;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
 
/**
 *
 * @author Celal Atalar
 */

public class GridLayoutDuzen extends JFrame implements ActionListener{
 
    private JButton buttons[];
    private String names[]={"one","two","three","four","five","six"};
    private GridLayout grid1,grid2;  
    private boolean toggle=true;
    private Container pencere;
    public GridLayoutDuzen()
    {
     super("GridLayout Olay?");
     grid1=new GridLayout(2,3,5,5);
     grid2=new GridLayout(3,2);
     pencere=getContentPane();
     pencere.setLayout(grid1);
     buttons=new JButton[names.length];
     for(int count=0;count<names.length;count++)
     {
       buttons[count]=new JButton(names[count]);
       pencere.add(buttons[count]);
       buttons[count].addActionListener(this);
     }
    
    setSize(350,500);
    setVisible(true);
    }
   
    public void actionPerformed(ActionEvent event)
    {
       if(toggle==true)  
       pencere.setLayout(grid2);
       else
       pencere.setLayout(grid1);
       toggle=!toggle;
       pencere.validate();
 
    }
    /**
     * @param args the command line arguments
     */

    public static void main(String[] args)
    {
     GridLayoutDuzen application=new GridLayoutDuzen();
     application.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }
 
}
 
 
 

Yorumlar (0)
Sadece kayıtlı kullanıcılar yorum yazabilir!
Son Güncelleme ( Perşembe, 07 Nisan 2011 23:47 )  
backlinktr.biz | 523: Origin is unreachable

Error 523 Ray ID: 5355382e59c87ec8 • 2019-11-14 01:30:21 UTC

Origin is unreachable

You

Browser

Working
Budapest

Cloudflare

Working
backlinktr.biz

Host

Error

What happened?

The origin web server is not reachable.

What can I do?

If you're a visitor of this website:

Please try again in a few minutes.

If you're the owner of this website:

Check your DNS Settings. A 523 error means that Cloudflare could not reach your host web server. The most common cause is that your DNS settings are incorrect. Please contact your hosting provider to confirm your origin IP and then make sure the correct IP is listed for your A record in your Cloudflare DNS Settings page. Additional troubleshooting information here.