public
Created

  • Download Gist
app
1 2 3 4 5
require 'java'
require 'forms-1.3.0.jar'
require 'miglayout15-swing.jar'
require 'gui.jar'
Java::Gui.main([])
error
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: net/miginfocom/swing/MigLayout
at Gui.initialize(Gui.java:67)
at Gui.<init>(Gui.java:49)
at Gui$1.run(Gui.java:36)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:682)
at java.awt.EventQueue.access$000(EventQueue.java:85)
at java.awt.EventQueue$1.run(EventQueue.java:643)
at java.awt.EventQueue$1.run(EventQueue.java:641)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:652)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.lang.ClassNotFoundException: net.miginfocom.swing.MigLayout
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 17 more
gui.java
Java
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
import java.awt.EventQueue;
 
import javax.swing.JFrame;
import java.awt.BorderLayout;
import javax.swing.JPanel;
import javax.swing.JMenuBar;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
import javax.swing.JLabel;
import javax.swing.JTextField;
import net.miginfocom.swing.MigLayout;
import javax.swing.JComboBox;
import javax.swing.JCheckBox;
import javax.swing.JTabbedPane;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.GridLayout;
import javax.swing.JEditorPane;
 
 
public class Gui {
 
private JFrame frmWebappswordSdk;
private JTextField textField;
private JPanel submodulesPanel;
 
/**
* Launch the application.
*/
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
Gui window = new Gui();
window.frmWebappswordSdk.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
 
/**
* Create the application.
*/
public Gui() {
initialize();
}
 
/**
* Initialize the contents of the frame.
*/
private void initialize() {
frmWebappswordSdk = new JFrame();
frmWebappswordSdk.setTitle("App");
frmWebappswordSdk.setBounds(100, 100, 478, 348);
frmWebappswordSdk.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frmWebappswordSdk.getContentPane().setLayout(new BorderLayout(0, 0));
JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.LEFT);
frmWebappswordSdk.getContentPane().add(tabbedPane, BorderLayout.CENTER);
JPanel info = new JPanel();
tabbedPane.addTab("Info", null, info, null);
info.setLayout(new MigLayout("", "[311px][grow]", "[16px][16px][][][grow]"));
JLabel nameLabel = new JLabel("Name");
info.add(nameLabel, "flowx,cell 0 0,alignx left");
textField = new JTextField();
info.add(textField, "cell 1 0,alignx left");
textField.setColumns(20);
JLabel langLabel = new JLabel("Lang");
info.add(langLabel, "cell 0 1,alignx left");
JComboBox comboBox = new JComboBox();
comboBox.setModel(new DefaultComboBoxModel(new String[] {"PHP"}));
info.add(comboBox, "cell 1 1,growx");
JLabel methodsLabel = new JLabel("Methods");
info.add(methodsLabel, "cell 0 2,alignx left");
JCheckBox chckbxNewCheckBox = new JCheckBox("New check box");
info.add(chckbxNewCheckBox, "flowy,cell 1 2");
JLabel submodulesLabel = new JLabel("Submodules");
info.add(submodulesLabel, "cell 0 3,alignx left");
JCheckBox chckbxNewCheckBox_1 = new JCheckBox("New check box");
info.add(chckbxNewCheckBox_1, "cell 1 2");
JButton addSubmoduleButton = new JButton("+");
addSubmoduleButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
System.out.println(textField.getText());
JComboBox comboBox_2 = new JComboBox();
submodulesPanel.add(comboBox_2);
}
});
info.add(addSubmoduleButton, "flowx,cell 1 3,aligny baseline");
submodulesPanel = new JPanel();
info.add(submodulesPanel, "cell 1 4,grow");
submodulesPanel.setLayout(new GridLayout(0, 1, 0, 0));
JComboBox comboBox_2 = new JComboBox();
submodulesPanel.add(comboBox_2);
JPanel installers = new JPanel();
tabbedPane.addTab("Installers", null, installers, null);
installers.setLayout(new GridLayout(0, 1, 0, 0));
JEditorPane editorPane = new JEditorPane();
installers.add(editorPane);
JPanel validators = new JPanel();
tabbedPane.addTab("Validators", null, validators, null);
validators.setLayout(new GridLayout(1, 0, 0, 0));
JEditorPane editorPane_1 = new JEditorPane();
validators.add(editorPane_1);
JMenuBar menuBar = new JMenuBar();
frmWebappswordSdk.getContentPane().add(menuBar, BorderLayout.NORTH);
JMenu mnFile = new JMenu("File");
menuBar.add(mnFile);
JMenuItem mntmNew = new JMenuItem("New");
mnFile.add(mntmNew);
JMenuItem mntmOpen = new JMenuItem("Open");
mnFile.add(mntmOpen);
}
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.