Toggle Theme Editor
Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Charcoal

S W I N G Loader

Discussion in 'Java Update' started by Joe, 2/12/19.

  1. Joe

    Joe Thành viên VIP

    Hi

    The mini project for SWING MVC is completed I have hereunder the PDF document and the jar file joemvc.jar for downloading. All comments and critics are appreciated. The doc is preliminary and it may contains some "abstruse" sentences and/or typing errors. Report them to me please. Thank you in advance.

    The source could be available and free for all CongdongJava members. However under TWO conditions:
    - Corrections and enhancements must be reported to me or CongdongJava.com
    - Only for private use. Commercial agreement must be made with me in advance.

    Joe
    Contact me via CDJ mailbox for the SWINGLoader source
     

    Attached Files:

    Last edited: 3/12/19 at 7:52 PM
    quydtkt likes this.
  2. Joe

    Joe Thành viên VIP

    Hi,
    I've "forgotten" to include the JFXPanel (the bridge to JavaFX). Sorry ! The revised PDF doc and joemvc.jar are here for downloading. Plus an example to show you how JFX works inside SWING JFrame:
    the model:
    PHP:
    /* the viewing frame
    <frame>name=Jframe tittle="MVC with JFrame" size=500,600 location=200,0 close=true resize=false</frame>
    <button>name=But text="Start JFX-SystemMonitoring" size=200,50 location=150,5 color=yellow</button>
    /*------------------------JFXPanel-------------------------------------------
    <fxpanel>name=jfx size=500,550 location=0,60 </fxpanel>
    /* end of frame
    The view
    PHP:
    import javax.swing.*;
    import java.awt.event.*;
    //
    import joe.cdj.mvc.SWINGLoader;
    // Joe Nartca (C)
    public class JFXMVC {
      public 
    JFXMVC(String fNamethrows Exception {
        
    SWINGLoader ml = new SWINGLoader("jfx.txt""JFXController");
        
    JFrame jf = (JFrameml.load();
        
    jf.setVisible(true);
      }
      public static 
    void main(String... athrows Exception {
        
    UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
        new 
    JFXMVC( );
      }
    }
    The controller
    PHP:
    import java.awt.Color;
    import javax.swing.*;
    import java.awt.event.*;
    import java.util.HashMap;
    // JFX
    import javafx.application.Platform;
    import javafx.embed.swing.JFXPanel;
    import javafx.scene.Group;
    import javafx.scene.Scene;
    // Joe Nartca (C)
    public class JFXController {
      public 
    JFXController(HashMap<StringObjectmap) {
        
    // get JButton, JTextField and JTextArea
        
    JButton but = (JButtonmap.get("But");
        
    but.addActionListener(-> {
          if (
    jfx != null) return;
          
    but.setBackground(Color.green);
          
    //-------------------go JFX--------------------
          
    jfx = (JFXPanelmap.get("jfx");
          
    Group root = new Group();
          
    SysMonJFX sysmon = new SysMonJFX(500500);
          (new 
    Thread(sysmon)).start();
          
    root.getChildren().add(sysmon);
          
    Scene scene = new Scene(root500500);
          
    jfx.setScene(scene);
          
    //----------------------------------------------
        
    });
      }
      private 
    JFXPanel jfx null;
    }
    and JFX app: SystemMonitoring
    PHP:
    import javafx.scene.canvas.Canvas;
    import javafx.scene.canvas.GraphicsContext;
    import javafx.scene.paint.Color;
    import javafx.application.Platform;
    //
    import java.util.*;
    import java.lang.management.*;
    // Joe Nartca (C)
    public class SysMonJFX extends Canvas implements Runnable {
      public 
    SysMonJFX(double widthdouble height) {
        
    super(widthheight);
        
    this.width  width;
        
    this.height height;
        
    ax  = new ArrayList<Double>(20);
        
    mem = new ArrayList<Double>(20);
        
    pTi = new ArrayList<Double>(20);
        
    pLo = new ArrayList<Double>(20);
        
    cpu = new ArrayList<Double>(20);
        
    swp = new ArrayList<Double>(20);
        
    vir = new ArrayList<Double>(20);
      }
      public 
    void setTime(int time) {
        
    this.time time;
      }
      public 
    void run() {
        try {
          
    GraphicsContext graph getGraphicsContext2D();
          
    com.sun.management.OperatingSystemMXBean osMaxBean =
              (
    com.sun.management.OperatingSystemMXBeanManagementFactory.getOperatingSystemMXBean();
          
    long mem0mem1pTi0pTi1swp0swp1vir0vir1;
          
    double x0 0fl height 235fs height 290ft height 310;
          
    double fv height 100fm height 145fc height 185;
     
          
    pTi0 osMaxBean.getProcessCpuTime();
          
    swp0 osMaxBean.getFreeSwapSpaceSize();
          
    mem0 osMaxBean.getFreePhysicalMemorySize();
          
    vir0 osMaxBean.getCommittedVirtualMemorySize();
          
    msg " mSec. Period, "+osMaxBean.getAvailableProcessors()+
                
    " cores, Total Mem. "+(osMaxBean.getTotalPhysicalMemorySize()/1073741824)+
                
    " GB, Horizontal Scale 2, Mem. Unit 1024 B";
          while (
    true) {
            
    x0 += 2// scaling step
            
    vir1 osMaxBean.getCommittedVirtualMemorySize();
            
    mem1 osMaxBean.getFreePhysicalMemorySize();
            
    swp1 osMaxBean.getFreeSwapSpaceSize();
            
    pTi1 osMaxBean.getProcessCpuTime();
     
            
    ax.add(x0);
            
    swp.add(fs-((double)(swp0 swp1)/1048576));
            
    mem.add(fm-((double)(mem1 mem0)/1048576));
            
    vir.add(fv-((double)(vir1 vir0)/1048576));
            
    pTi.add(ft-((double)(pTi1-pTi0)/1000000));
            
    cpu.add(fc-(double)(osMaxBean.getSystemCpuLoad()*100));
            
    pLo.add(fl-(double)(osMaxBean.getProcessCpuLoad()*100));
            
    Platform.runLater(() -> { // avoid frozen update
              
    draw(graph);
            });
            
    java.util.concurrent.TimeUnit.MILLISECONDS.sleep(time);
            if (
    x0 width) {
              
    ax.clear();
              
    mem.clear();
              
    pTi.clear();
              
    pLo.clear();
              
    cpu.clear();
              
    swp.clear();
              
    vir.clear();
              
    x0 0;
            }
            
    mem0 mem1;
            
    swp0 swp1;
            
    pTi0 pTi1;
            
    vir0 vir1;
            
    System.gc();
          }
        } catch (
    Exception e) { }
      }
      private 
    void draw(GraphicsContext g) {
        
    g.setLineWidth(1.3);
        
    g.setFill(Color.BLACK);
        
    g.fillRect(00widthheight);
        
    g.setStroke(Color.ALICEBLUE);
        
    g.strokeText("PROXY ACTIVITIES MONITORING"13515);
      
        
    double h height-40;
        
    g.setStroke(Color.CYAN);
        
    g.strokeLine(10h30h);
        
    g.strokeText("SwapSpace"35h);
        
    g.setStroke(Color.LIME);
        
    g.strokeLine(120h140h);
        
    g.strokeText("CPU-Load"145h);
        
    g.setStroke(Color.DODGERBLUE);
        
    g.strokeLine(230h250h);
        
    g.strokeText("Virtual Mem"255h);
      
        
    height-25;
        
    g.setStroke(Color.FUCHSIA);
        
    g.strokeLine(230h250h);
        
    g.strokeText("ProcessTime"255h);
        
    g.setStroke(Color.ORANGERED);
        
    g.strokeLine(120h140h);
        
    g.strokeText("ProcessLoad"145h);
        
    g.setStroke(Color.YELLOW);
        
    g.strokeLine(10h30h);
        
    g.strokeText("Used Memory"35h);
        
    g.setStroke(Color.ALICEBLUE);
        
    g.strokeText(time+msg10height-9);
     
        for (
    int i 01mx pLo.size(); mx; ++i, ++j) {
          
    double b ax.get(i);
          
    double e ax.get(j);
          
    g.setStroke(Color.YELLOW);
          
    g.strokeLine(bmem.get(i), emem.get(j));
          
    g.setStroke(Color.ORANGERED);
          
    g.strokeLine(bpLo.get(i), epLo.get(j));
          
    g.setStroke(Color.FUCHSIA);
          
    g.strokeLine(bpTi.get(i), epTi.get(j));
          
    g.setStroke(Color.LIME);
          
    g.strokeLine(bcpu.get(i), ecpu.get(j));
          
    g.setStroke(Color.CYAN);
          
    g.strokeLine(bswp.get(i), eswp.get(j));
          
    g.setStroke(Color.DODGERBLUE);
          
    g.strokeLine(bvir.get(i), evir.get(j));
        }
      }
      private 
    int time 150;
      private 
    String msg "";
      private 
    double heightwidth;
      private 
    ArrayList<DoubleaxmempLopTicpuswpvir;
    }
    The SWING MVC presentation
    [​IMG]
     

    Attached Files:

    Last edited: 5/12/19 at 4:21 PM
  3. Joe

    Joe Thành viên VIP

    For the future TechPool product initiated by CDJ Member Thanhpv I have enhanced the package so that 4 SWING components
    - JComboBox
    - JList
    - JTable
    - JTree

    can contain Icons (and text) instead of only text.

    Some hints for JComboBox, JList, J Table and JTree: if icons (and text) are used as items the entry format is as following:
    PHP:
    text@imageFile or @imageFile if text is unneeded
     
    Example
    :
    - For 
    JTree:
    <
    Fruits:-:smiling@smiling.gif,surprise@surprise.gif,thumbup@thumbUp.gif/>
    - For 
    JComboBox or JList:
    <
    smiling@smiling.gif,surprise@surprise.gif,thumpup@thumbUp.gif/>
    And the displaying results:
    [​IMG]
    [​IMG]
    The SWINGLoader Package:
    PHP:
    API                                    Comment
    ------------------------------------------------------------------------------
    SWINGLoader                            The main SWINGLoader
    SWING                                  All tools used by SWINGLoader
    ICell                                  Icon Cell used 
    for JTreeJList,
                                           
    JComboBoxJTable
    TCellRenderer                          The TreeCellRenderer 
    for JTree and JTable
    ComboCellRenderer                      The JComboBox Renderer
    LCellRenderer                          The JList Renderer
    TableRenderer                          The JTable Renderer
    If you work with Renderer your items are wrapped by ICell and when an item is selected its values can be accessed by ICell gettters. All Renderers have ONE method, getICell(), and this method returns the corresponding ICell of the selected cell.
    PHP:
    ICell API                             Comment
    ------------------------------------------------------------------------------
    public 
    ICell(String text@imageFile)   Constructor with the string of format text@imageFile
    public JLabel getCell()               Return the JLabel containing the Text and the Icon
    public ImageIcon getIcon()            Return the ImageIcon of imageFile
    public String getFile()               Return the  given imageFile (without @)
    public 
    String getText()               Return the given text
    Example:
    PHP:
        // for JList (same JComboBox)
        
    JList<Stringjlst = (JListmap.get("jlist");
        
    jlst.addListSelectionListener(-> {
          
    Object obj jlst.getSelectedValue();
          if (
    obj instanceof ICelljta.append("\nSelected from JList::"+((ICell)obj).getText());
          else  
    jta.append("\nSelected from JList::"+(String)obj);
        });
        
    // for JTree
        
    JTree jtree = (JTreemap.get("jTree");
        
    jtree.getSelectionModel().addTreeSelectionListener(-> {
          
    DefaultMutableTreeNode dn = (DefaultMutableTreeNode)e.getPath().getLastPathComponent();
          
    ICell ic = (ICelldn.getUserObject();
          
    lab.setText("From JTree:"+ic.getText());
        });
    (new version of joemvc.jar)
     

    Attached Files:

    Last edited: 7/12/19 at 12:54 AM
    quydtkt likes this.
  4. Joe

    Joe Thành viên VIP

    Hi everyone
    The mini project SWINGLoader for SWING MVC is completed. All SWING components are implemented. I'm working on the Documents. Just for fun I demonstrate hereunder an App that works with SWINGLoader package as a simple Modelling Application (which is jarred for distribution)
    [​IMG]
    The codes:
    The view: ProtoTyping.java
    PHP:
    import java.io.*;
    import java.awt.*;
    import java.util.*;
    import javax.swing.*;
    //picture: https://i.ibb.co/chbtpKG/Proto-Typing.jpg
    import joe.cdj.mvc.SWINGLoader;
    // Joe Nartca (C)
    public class ProtoTyping {
      public 
    ProtoTyping( ) throws Exception {
        
    SWINGLoader ml = new SWINGLoader("main.txt""ProtoController");
        ((
    JFrameml.load()).setVisible(true);
      }
      private static 
    String[] parms;
      public static 
    void main(String... athrows Exception {
        
    UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
        new 
    ProtoTyping();
      }
    }
    The ProtoController.java
    PHP:
    import java.io.*;
    import java.awt.*;
    import java.util.*;
    import javax.swing.*;
    import java.nio.file.*;
    import javax.swing.event.*;
    import  javax.swing.text.*;
    import joe.cdj.mvc.SWING;
    // Joe Nartca (C)
    public class ProtoController {
      public 
    ProtoController(HashMap<StringObjectmap) {
        
    cyan = new DefaultHighlighter.DefaultHighlightPainter(Color.cyan);
        
    frame = (JFramemap.get("frame");
        
    area = (JTextAreamap.get("area");
        
    area.setFont(new Font("Lucida Console"Font.PLAIN11));
        
    area.addMouseListener(new CopyAndPaste(area));
        
    tit = (JLabelmap.get("file");
        
    JButton load = (JButtonmap.get("load");
        
    HashMap<StringStringkeys = new HashMap<>();
        try {
          
    String X null;
          
    File file = new File("basic.txt");     
          if (
    file.exists()) = (new String(Files.readAllBytes(file.toPath())));
          else 
    SWING.readJAR("basic.txt"ProtoController.class);
          
    String els[] = X.split(System.lineSeparator());
          for (
    String s elskeys.put(s.substring(1,s.indexOf(">")), s);
        } catch (
    Exception ex) {
          
    error("Missing basic file");
          
    System.exit(0);
        }
        
    load.addActionListener(-> {
          
    load();
        });
        ((
    JMenuItem)map.get("Load")).addActionListener(e->{
          
    load();
        });
        
    JButton save = (JButtonmap.get("save");
        
    save.addActionListener(-> {
          
    stow(true);
        });
        ((
    JMenuItem)map.get("Save")).addActionListener(e->{
          
    stow(true);
        });
       
        
    search = (JButtonmap.get("search");
        
    search.addActionListener(-> {
          
    search();
        });
        ((
    JMenuItem)map.get("Search")).addActionListener(e->{
          
    search();
        });
        
    JButton replace = (JButtonmap.get("replace");
        
    replace.addActionListener(-> {
          
    replace();
        });
        ((
    JMenuItem)map.get("Replace")).addActionListener(e->{
          
    replace();
        });
        
    JButton show = (JButtonmap.get("show");
        
    show.addActionListener(-> {
          
    show();
        });
        ((
    JMenuItem)map.get("Replace")).addActionListener(e->{
          
    replace();
        });
        
    JButton clear = (JButtonmap.get("clear");
        
    clear.addActionListener(-> {
          
    area.selectAll();
          
    area.replaceSelection("");
          
    op 0;
          
    on false;
          
    pat null;
          
    rep null;
          
    fName null;
          
    saved false;
          
    tit.setText("Modelling for File:");
        });
        
    JComboBox combo = (JComboBoxmap.get("cBox");
        
    combo.addActionListener(-> {
          
    int p area.getCaretPosition();
          
    String sel = (String) combo.getSelectedItem();
          
    String key keys.get(sel)+System.lineSeparator();
          
    area.insert(keyp);
          
    area.setCaretPosition(p+key.length());
        });
      }
      private 
    void show() {
        
    int l area.getText().length();
        if (
    fName == null || == 0) {
          
    error("No or empty Model for show!");
          return;
        }
        if (
    saved) {
          if (!
    isOK("Must be saved before show. OK?")) return;
          
    stow(false);
        }
        try {
          
    Runtime.getRuntime().exec("java -jar joemvc.jar "+fName);
        } catch (
    Exception ex) {
          
    ex.printStackTrace();
          
    error("Unable to show "+fName);
        }
      }
      private 
    void load() {
        
    fName input("Load file:");
        if (
    fName == null) return;
        if (
    fName.length() > 0) try {
          
    File file = new File(fName);
          
    area.append((new String(Files.readAllBytes(file.toPath()))));
          
    tit.setText("Modelling for File:"+fName);
          
    area.setCaretPosition(0);
          
    saved false;
        } catch (
    Exception ex) {
          
    error("Unknown "+fName);
        }
      }
      private 
    void replace() {
        
    pat input("Search for");
        if (
    pat == null) return;
        
    int pl pat.length();
        if (
    pl == 0) {
          
    error("Empty search pattern. No Replace!");
          return;
        }
        
    rep input("Replaced by");
        if (
    rep == null) return;
        
    int rl rep.length();
        if (
    rl == 0) {
          
    error("Empty replaced pattern. No Replace!");
          return;
        }
        
    String cont area.getText();
        
    int p cont.indexOf(pat);
        if (
    0) {
          
    error(pat+" not found.");
          return;
        }
        
    Highlighter hl area.getHighlighter();
        
    op cont.lastIndexOf(pat)+rl;
        while(
    >= 0){
          
    cont cont.replace(patrep);
          
    area.setText(cont); // replaced
          
    cont.indexOf(patp+rl);
          
    saved true;
        }
        
    cont.indexOf(rep);
        while (
    >= && op) {
          try {
            
    pl p+rl;
            
    hl.addHighlight(pplcyan);
            
    cont.indexOf(reppl);
          } catch (
    Exception ex) {
            return;
          }
        }
      }
      private 
    void search() {
        if (!
    on) {
          
    pat input("Search");
          if (
    pat == null) return;
        }
        
    int pl pat.length();
        if (
    pl == 0) {
          
    error("Empty search pattern. No search!");
          return;
        }
        
    String cont area.getText();
        
    int p cont.indexOf(pat);
        if (
    0) {
          
    error(pat+" not found.");
          
    search.setBackground(Color.yellow);
          return;
        }
        
    Highlighter hl area.getHighlighter();
        while(
    >= 0){
          try {               
            
    hl.addHighlight(pp+plcyan);
            
    cont.indexOf(patp+pl);           
          } catch (
    Exception ex) {
            break;
          }
        }
        
    on true;
        if (
    op != psearch.setBackground(Color.green);
        else 
    search.setBackground(Color.yellow);
        
    op p;
      }
      private 
    void stow(boolean ack) {
        
    fName input("Save to file:"fName);
        if (
    fName == null) return;
        if (
    fName.length() == 0) {
          
    error("Empty file name. No write!");
          return;
        }
        if ((new 
    File(fName)).exists()) {
          if (!
    isOK("Overwrite?")) return;
        }
        
    String cont area.getText();
        if (
    cont.length() == 0) {
          
    error("Nothing to save! Skip saving.");
          return;
        }
        try (
    FileOutputStream fout = new FileOutputStream(fNametrue)) {
          
    fout.write(cont.getBytes());
          
    fout.flush();
          
    fout.close();
          if (
    ackdone();
          
    saved false;
        } catch (
    Exception ex) {
          
    error("Unable to save to "+fName);
        }
      }
      private 
    String input(String msg) {
         return 
    JOptionPane.showInputDialog(framemsg);
      }
      private 
    String input(String msgString def) {
         return 
    JOptionPane.showInputDialog(framemsgdef);
      }
      private 
    boolean isOK(String msg) {
       
    Object[] options = { "OK""CANCEL" };
       return 
    JOptionPane.showOptionDialog(framemsg"Warning",
                           
    JOptionPane.DEFAULT_OPTIONJOptionPane.WARNING_MESSAGE,
                           
    nulloptionsoptions[0]) == 0;
      }
      private 
    void done( ) {
        
    JOptionPane.showConfirmDialog(frame"Done!""Acknowledge"JOptionPane.DEFAULT_OPTION);
     
      }
      private 
    void error(String msg) {
        
    JOptionPane.showMessageDialog(framemsg"Error"JOptionPane.ERROR_MESSAGE);
      }
      private 
    int op;
      private 
    JLabel tit;
      private 
    JFrame frame;
      private 
    JTextArea area;
      private 
    JButton search;
      private 
    String patrepfName;
      private 
    boolean on falsesaved false;
      private 
    Highlighter.HighlightPainter cyan;
    }
    The Model in plain text
    PHP:
    -----------------------------the main.txt
    <framename=frame tittle="ProtoTyping with SWINGLoader" size=900,720 location=10,10
            close
    =true resize=false</frame>
    <
    panel>name=ProtoType file=prototype.txt size=900,665 location=20,5</panel>
    ----------------------------
    The prototype.txt
    <panel>name=panel size=900,665 location=0,0</panel>
    <
    menubar>name=menubar size=840,20 location=0,0 file=menu.txt</menubar>
    <
    button>name=load text=Load size=80,50 location=0,85</button>
    <
    button>name=save text=Save size=80,50 location=0,145</button>
    <
    button>name=search text=Search size=80,50 location=0,205</button>
    <
    button>name=replace text=Replace size=80,50 location=0,265</button>
    <
    button>name=show text=Show size=80,50 location=0,335</button>
    <
    button>name=clear text=Clear size=80,50 location=0,395</button>
    <
    combobox>name=cBox items=protolist.txt size=110,50 location=0,455</combobox>
    <
    label>name=file text="Modelling for File:" size=500,30 location=120,15 </label>
    <
    textarea>name=area color=lightgray size=710,620 location=120,40 scroll=true</textarea>
    --------------------------
    The protolist.txt for JComboBox
    <frame,panel,dialog,button,radiobuttob,togglebutton,label,combobox,checkbox,progressbar,table,tree,fxpanel,
       
    textfield,formattedtextfield,passwordfield,textarea,textpane,
       
    editorpane,tabbedpane,list/>
    ----------------------------
    Templates for the Modelling Editor or JTextArea (basic.txt)
    <
    frame>name=anyName tittle=anyTitle size=w,h location=x,y resize=false close=false bgimage=imgFile</frame>
    <
    panel>name=name size=w,h location=x,y</panel>
    <
    panel>name=anyName file=modelFile.txt size=w,h location=x,y</panel>
    <
    dialog>name=anyName tittle=anyTitle load=panel.txt size=w,h location=x,y close=false</dialog>
    <
    tabbedpane>name=name tabs=panel_1.txt,...,panel_X.txt tabtext=text_1,...,text_X size=w,h location=x,y</tabbedpane>
    <
    button>name=anyName text=anyText size=w,h location=x,y icon=imageFile color=anyColor</button>
    <
    radiobutton>name=anyName text=anyText size=w,h location=x,y icon=imgFile color=anyColor</radiobutton>
    <
    togglebutton>name=anyName text=anyText size=w,h location=x,y icon=imageFile color=anyColor</button>
    <
    label>name=anyName text=anyText size=w,h location=x,y icon=fName opaque=true color=anyColor</label>
    <
    textfield>name=anyName text=anyText size=w,h location=x,y column=n color=anyColor</textfield>
    <
    formattedtextfield>name=name text=anyText size=w,h location=x,y column=n color=anyColor</formattedtextfield>
    <
    passwordfield>name=name text=anyText size=w,h location=x,y column=n color=anyColor</passwordfield>
    <
    textarea>name=anyName text=anyText size=w,h location=x,y edit=false row=n column=n color=anyColor</textarea>
    <
    textpane>name=anyName content=plain/html size=w,h location=x,y text=text.txt</textpane>
    <
    editorpane>name=anyName content=plain/html size=w,h location=x,y text=text.txt</editorpane>
    <list>
    name="name" items=string_1,..,string_x color=anyColor size=w.h location=x,y</list>
    <list>
    name="name" items=file.txt color=anyColor size=w.h location=x,y</list>
    <
    combobox>name=anyName items=string1,..,stringX color=anyColor size=w.h location=x,y</combobox>
    <
    checkbox>name=anyName text=anyText icon=imagefile selicon=imagefile disicon=imagefile selected=true color=anyColor size=w,h location=x,y</checkbox>
    <
    progressbar>name=anyName size=w,h location=x,y minmax=a,b orient=vertical/horizontal</progressbar>
    <
    table>name=anyName size=w,h location=x,y roco=n,m color=anyColor table=table.txt</table>
    <
    tree>name=anyName nodes=tree.txt size=w.h location=x,y color=anyColor</tree>
    <
    fxpanel>name=anyName size=w,h location=x,</fxpanel>
    <
    menubar>name=anyName size=w,h location=x,y file=menu.txt</menubar>
    <
    popupmenu>name=anyName text=anyText size=w,h location=x,y file=items.txt</popupmenu>
    <
    toolbar>name=anyName text=anyText orientation size=w,h location=x,</toolbar>
    The Jar things
    PHP:
    ----------------------The manifest.txt
    Manifest
    -Version1.0
    Class-Pathjoemvc.jar
    Created
    -By1.0.0 (Joe TNartca)
    ---------------------
    The build.bat (for Windows)
    cd .\classes
    jar 
    -cvfme ../Modelling.jar manifest.txt ProtoTyping *.class *.txt > ../o.txt
    cd 
    ..\
    To run the distributed Modelling.jar: double clicks on the Jar file (Windows) or on a CMD window:
    PHP:
    java -jar Modelling.jar
    Note: the SWINGLoader package must be included in your CLASSPATH before you can run this Modelling
    Joe
    Note: I'll be away for a while...Wish you all a happy New Year 2020 and a Merry Xmas (even I'm a convinced atheist)
     

    Attached Files:

    Last edited: 9/12/19 at 12:43 AM

Chia sẻ trang này

Loading...