Package net.miginfocom.swing

Examples of net.miginfocom.swing.MigLayout


// ============= Protected Methods ============== //
// ============= Private Methods ============== //
    private void setup(){
  // initialize menu
  initMenu();
  rootPanel = new JPanel(new MigLayout("fill"));
  northPanel = new JPanel(new MigLayout());
  southPanel = new JPanel(new MigLayout("fill"));

  // initialize combo boxes and buttons
  avatarsCB = new JComboBox();
  weightUnitCB = new JComboBox(new Object[]{"kg","lbs"});
  balanceBoardStatusL = new JLabel("Balance Board: Disconnected");
View Full Code Here


    }
// ============= Protected Methods ============== //
// ============= Private Methods ============== //
    private void setup(){
  //rootPanel = new JPanel(new MigLayout("","grow","grow"));
  rootPanel = new JPanel(new MigLayout());
  measurementCB = new JComboBox(new Object[]{"kg","lbs"});
  weightTF = new JTextField(20);
  JLabel infoL = new JLabel("Weight");
  cancelB = new JButton("Cancel");
  addB = new JButton("Add");
  doneB = new JButton("Done");
  cancelB.addActionListener(this);
  addB.addActionListener(this);
  doneB.addActionListener(this);

  datePanel = JDateComponentFactory.createJDatePanel();
  datePanel.setShowYearButtons(true);

  SpinnerNumberModel hourModel = new SpinnerNumberModel(0,0, 24,1);
  hourSpinner = new JSpinner(hourModel);
  SpinnerNumberModel minModel = new SpinnerNumberModel(0,0, 59,1);
  minSpinner = new JSpinner(minModel);

  JPanel timeP = new JPanel(new MigLayout());
  timeP.add(new JLabel("Hour"));
  timeP.add(new JLabel("Min"),"wrap");
  timeP.add(hourSpinner);
  timeP.add(minSpinner);

  JPanel northP = new JPanel(new MigLayout());
  northP.add(infoL);
  northP.add(weightTF);
  northP.add(measurementCB);

  JPanel rightP = new JPanel(new MigLayout());
  rightP.add(cancelB);
  rightP.add(addB);
  rightP.add(doneB);
  JPanel southP = new JPanel(new MigLayout("fill"));
  southP.add(timeP,"dock east,push,grow");
  southP.add(rightP,"dock west,push,growy");

  rootPanel.add(northP,"dock north");
  rootPanel.add((JComponent)datePanel,"dock center");
View Full Code Here

// ============= Protected Methods ============== //
// ============= Private Methods ============== //
    private void setup(){
  //rootPanel = new JPanel(new MigLayout("","grow","grow"));
  rootPanel = new JPanel(new MigLayout("fill"));
  infoLabel = new JLabel("");
  actionB = new JButton("Cancel");
  actionB.addActionListener(this);
  progressBar = new JProgressBar();
  progressBar.setOrientation(SwingConstants.HORIZONTAL);
View Full Code Here

  static int CUR_DPI = PlatformDefaults.getDefaultDPI();
  static HashMap<String, Font> ORIG_DEFAULTS;

  private static JPanel createScaleMirror()
  {
    return new JPanel(new MigLayout()) {
      protected void paintComponent(Graphics g)
      {
        super.paintComponent(g);

        if (GUI_BUF != null) {
View Full Code Here

      dpiStrings.add(Math.round(PlatformDefaults.getDefaultDPI() * f) + " DPI (" + Math.round(f * 100f + 0.499f) + "%)");

    final JComboBox dpiCombo = new JComboBox(dpiStrings);
    dpiCombo.setSelectedIndex(5);

    JPanel panel = new JPanel(new MigLayout("alignx center, insets 10px, flowy", "[]", "[]3px[]0px[]"));

    JLabel lafLabel = new JLabel("Look & Feel:");
    JLabel sliderLabel = new JLabel("Simulated DPI:");
    JLabel scaleLabel = new JLabel("Component/Text Scaling:");
    JLabel layoutLabel = new JLabel("LayoutManager Scaling:");
View Full Code Here

        APP_GUI_FRAME = new JFrame("Resolution Independence Simulator");

//        RepaintManager.currentManager(APP_GUI_FRAME).setDoubleBufferingEnabled(false);

        JPanel uberPanel = new JPanel(new MigLayout("fill, insets 0px, nocache"));

        JPanel mainPanel = new JPanel(new MigLayout("fill, insets 0px, nocache")) {
          public void paintComponent(Graphics g)
          {
            Graphics2D g2 = (Graphics2D) g.create();

            g2.setPaint(new GradientPaint(0, 0, new Color(20, 20, 30), 0, getHeight(), new Color(90, 90, 110), false));
View Full Code Here

}

class HiDPIDemoPanel extends JPanel {
  public HiDPIDemoPanel()
  {
    super(new MigLayout());

        JLabel jLabel1 = new JLabel("A Small Label:");
        JTextField jTextField1 = new JTextField(10);
        JButton jButton1 = new JButton("Cancel");
        JButton jButton2 = new JButton("OK");
View Full Code Here

{
  public static void main(String[] args)
  {
    JFrame frame = new JFrame();

    JPanel panel = new JPanel(new MigLayout("debug, align right"));
    panel.add(new JLabel("Three"), "wrap");
    panel.add(new JLabel("Six"));

    frame.add(panel);
    frame.setBounds(500, 500, 500, 500);
View Full Code Here

{
  public static void main(String[] args)
  {
    JFrame frame = new JFrame();

    JPanel panel = new JPanel(new MigLayout("debug, align right"));
    panel.add(new JLabel("Three"), "wrap");
    panel.add(new JLabel("Six"));

    frame.add(panel);
    frame.setBounds(500, 500, 500, 500);
View Full Code Here

  public JComponent createTest()
  {
    JPanel thisp = new JPanel();

    MigLayout layout = new MigLayout();
    thisp.setLayout(layout);

//    thisp.add("wrap, span", new JButton());
//    thisp.add("newline, span", new JButton());
//    thisp.add("newline, span", new JButton());
View Full Code Here

TOP

Related Classes of net.miginfocom.swing.MigLayout

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.