Add to Favorites    Make Home Page 6941 Online  
 Language Categories  
 Our Services  

Home » Java Home » GUI Home » J(ava)editor - Basic Java Desinger(written with java) (Mini Project)


Search Projects & Source Codes:

Title J(ava)editor - Basic Java Desinger(written with java) (Mini Project)
Author can ÷kşelik
Author Email muhtemelen_ben [at]
Description It's a simple java designer.I'm goint to develop it.You can develop it too.Enjoy with it!

Category Java » GUI
Hits 19120
Code Select and Copy the Code
Code : import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; import*; import*; public class Jeditor extends JFrame implements ActionListener { private JTextPane metin; private Dialog diyalog; private JButton dugme,ac,derle; private JTextField kutu,yuk,gen,baslik; private JMenuBar mb; private JScrollPane kay; private JMenu dosya,hazirkod,gorunum,yardim; private String icerik=""; private JMenuItem yeni,kapat,yazdir,guigir,iogir,butongir,etiketgir,tasarlayici,win,linux,ha kkimda; private JButton tamam; private JButton iptal; public Jeditor() { super("Java Edit÷r³"); setSize(680,530); Container c=getContentPane(); metin=new JTextPane(); dugme=new JButton("Kaydet"); dugme.addActionListener(this); kutu=new JTextField(); tasarlayici=new JMenuItem("Pencere Tasarla"); tasarlayici.addActionListener(this); derle=new JButton("Kodu Derle"); derle.addActionListener(this); ac=new JButton("Dosya Aş"); ac.addActionListener(this); kay=new JScrollPane(metin); c.add(kay); mb=new JMenuBar(); dosya=new JMenu("Dosya"); hazirkod=new JMenu("Hemen Kod Ekle"); yardim=new JMenu("Yard²m"); yeni=new JMenuItem("Yeni Proje Ba?lat"); yeni.addActionListener(this); hazirkod.add(tasarlayici); kapat=new JMenuItem("Kapat"); kapat.addActionListener(this); yazdir=new JMenuItem("Kodu Yazd²r"); yazdir.addActionListener(this); guigir=new JMenuItem("GUI Program Kodu Ekle"); guigir.addActionListener(this); hazirkod.add(guigir); gorunum=new JMenu("G÷r³n³m"); win=new JMenuItem("Windows Tarz²"); win.addActionListener(this); gorunum.add(win); linux=new JMenuItem("Linux Tarz²"); linux.addActionListener(this); gorunum.add(linux); hakkimda=new JMenuItem("Hakk²mda"); hakkimda.addActionListener(this); yardim.add(hakkimda); iogir=new JMenuItem("I/O Program Kodu Ekle"); iogir.addActionListener(this); hazirkod.add(iogir); butongir=new JMenuItem("Buton Ekle"); butongir.addActionListener(this); hazirkod.add(butongir); etiketgir=new JMenuItem("Etiket Ekle"); etiketgir.addActionListener(this); hazirkod.add(etiketgir); dosya.add(yeni); dosya.add(yazdir); dosya.add(kapat); mb.add(dosya); mb.add(hazirkod); mb.add(gorunum); mb.add(yardim); kutu.setBounds(5,10,150,22); derle.setBounds(375,10,100,25); dugme.setBounds(172,10,100,25); kay.setBounds(5,40,660,440); ac.setBounds(274,10,100,25); c.setLayout(null); c.add(kay); c.add(derle); c.add(ac); c.add(dugme); c.add(kutu); setJMenuBar(mb); show(); } private void frameAc() { diyalog=new Dialog(new JFrame()); diyalog.resize(220,135); diyalog.move(320,220); diyalog.setLayout(null); diyalog.setTitle("Haz²r Pencere D³zenleyici"); YeniPencereActionListener yp=new YeniPencereActionListener(); tamam=new JButton("Tamam"); tamam.addActionListener(yp); iptal=new JButton("¦ptal"); iptal.addActionListener(yp); JLabel genet=new JLabel("Geni?lik"); gen=new JTextField(); JLabel yuket=new JLabel("Y³kseklik"); yuk=new JTextField(); JLabel basliket=new JLabel("Program²n Ba?l²­²"); baslik=new JTextField(); basliket.setBounds(10,30,60,20); baslik.setBounds(71,30,100,22); genet.setBounds(10,55,60,20); gen.setBounds(71,55,30,25); yuket.setBounds(10,80,60,20); yuk.setBounds(71,80,30,25); tamam.setBounds(10,105,100,25); iptal.setBounds(115,105,100,25); diyalog.add(baslik); diyalog.add(basliket); diyalog.add(tamam); diyalog.add(iptal); diyalog.add(yuk); diyalog.add(yuket); diyalog.add(gen); diyalog.add(genet);; } private void guiEkle() { String gui="import java.awt.*;"; String gui2="public class BurayiAyarla extends Frame {"; String gui3="public BurayiAyarla() {"; String gui4="super("Baslik Buraya"); setSize(400,300);"; String gui5="show(); }"; String gui6="public static void main(String[] args) {"; String gui7="BurayiAyarla a=new BurayiAyarla(); } }"; String ekle=gui+" "+gui2+" "+gui3+" "+gui4+" "+gui5+" "+gui6+" "+gui7; metin.setText(ekle); } private void ioEkle() { String io="import*; public class BurayiAyarla { public static void main(String[] args) { System.out.print("Merhaba d³nya..."); } }"; metin.setText(io); } private void dosyaOku() { String m=kutu.getText(); try { FileReader oku=new FileReader(m); BufferedReader buf=new BufferedReader(oku); String satir=buf.readLine(); while (satir!=null) { icerik=icerik+satir; satir=buf.readLine(); } } catch (IOException er) { System.out.print("hata"); } } private void dosyaYaz() { String mesaj=kutu.getText(); File dosya=new File(mesaj); try { dosya.createNewFile(); FileOutputStream yaz=new FileOutputStream(mesaj); PrintWriter yazdirici=new PrintWriter(yaz); String al=metin.getText(); yazdirici.print(al); yazdirici.close(); } catch (IOException ei) { System.out.print("hata"); } } private void win() { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); SwingUtilities.updateComponentTreeUI(this); } catch (Exception ef) { System.out.print("hata.."); } } public void actionPerformed(ActionEvent e) { Object kaynak=e.getSource(); if (kaynak==dugme) { dosyaYaz(); } else if (kaynak==yeni) { kutu.setText(""); metin.setText(""); } else if (kaynak==kapat) { System.exit(0); } else if (kaynak==derle) { try { String derle1=kutu.getText(); Runtime.getRuntime().exec("C:\command.exe javac " + derle1); } catch (IOException ek) { //.. } } else if (kaynak==guigir) { guiEkle(); } else if (kaynak==ac) { icerik=""; dosyaOku(); metin.setText(icerik); } else if (kaynak==hakkimda) { } else if (kaynak==iogir) { ioEkle(); } else if (kaynak==tasarlayici) { frameAc(); } else if (kaynak==win) { win(); } else if (kaynak==linux) { } } class YeniPencereActionListener implements ActionListener { public void actionPerformed(ActionEvent ed) { Object k=ed.getSource(); String yuk1=yuk.getText(); String gen1=gen.getText(); String bas=baslik.getText(); if (k==tamam) { String ui="import java.awt.*;"; String ui2="public class BurayiAyarla extends Frame {"; String ui3="public BurayiAyarla() {"; String ui4="super("" + bas + ""); setSize(" + gen1 + "," + yuk1 + ");"; String ui5="show(); }"; String ui6="public static void main(String[] args) {"; String ui7="BurayiAyarla a=new BurayiAyarla(); } }"; String kekle=ui+" "+ui2+" "+ui3+" "+ui4+" "+ui5+" "+ui6+" "+ui7; metin.setText(kekle); diyalog.hide(); } else if (k==iptal) { diyalog.hide(); } } } public static void main(String[] args) { Jeditor j=new Jeditor(); } }

Related Source Codes

Script Name Author
Sending mail Using JavaMail to Yahoo and Gmail accounts sai prasad
Simple Program in Java to Implement Multithreading Satish.K
Simple Calculator in Java Using Remote Method Invocation Satish.K
Guest Book Application Using Servlets Satish.K
String Manipulation Using Stringification Satish.K
String Manipulation Using Stringification Satish.K
Moving Ball Application Using Java Beans Satish.K
Rapid Roll game subrahmanyeswararao
student mgm arpan
Sourav Datta
Download Manager Sagar
Address Book in Java Rahul Chouhan
address book using java database connectivity(jdbc-msaccess) shekhar bansal
sun Steganography B.Rajavel
Connecting Java with MS-Access - Inserting data in Aseem


Google Groups Subscribe to SourceCodesWorld - Techies Talk

Free eBook - Interview Questions: Get over 1,000 Interview Questions in an eBook for free when you join JobsAssist. Just click on the button below to join JobsAssist and you will immediately receive the Free eBook with thousands of Interview Questions in an ebook when you join.

New! Click here to Add your Code!

ASP Home | C Home | C++ Home | COBOL Home | Java Home | Pascal Home
Source Codes Home Page


Google Search


Source Codes is a part of Vyom Network.

Vyom Network : Web Hosting | Dedicated Server | Free SMS, GRE, GMAT, MBA | Online Exams | Freshers Jobs | Software Downloads | Interview Questions | Jobs, Discussions | Placement Papers | Free eBooks | Free eBooks | Free Business Info | Interview Questions | Free Tutorials | Arabic, French, German | IAS Preparation | Jokes, Songs, Fun | Free Classifieds | Free Recipes | Free Downloads | Bangalore Info | Tech Solutions | Project Outsourcing, Web Hosting | GATE Preparation | MBA Preparation | SAP Info | Software Testing | Google Logo Maker | Freshers Jobs

Sitemap | Privacy Policy | Terms and Conditions
Copyright ©2003-2017, All Rights Reserved.
Page URL:

Download Yahoo Messenger | Placement Papers | Free SMS | C Interview Questions | C++ Interview Questions | Quick2Host Review