/** * Initialises all of the components on this panel. */ private void init() { // WARNING: called from ctor so must not be overridden (i.e. must be private or final) setLayout(new BorderLayout(5, 0)); // Register the handler for focus listening. This handler will // only notify the registered when the text changes from when // the focus is gained to when it is lost. mTextField.addFocusListener(this); // Add the sub components add(mLabel, BorderLayout.WEST); add(mTextField, BorderLayout.CENTER); }
private JPanel createDestinationPane() { JPanel panel = new VerticalPanel(); //new BorderLayout(3, 0) this.mqttDestination.setLayout((new BoxLayout(mqttDestination, BoxLayout.X_AXIS))); panel.add(mqttDestination); JPanel TPanel = new JPanel(); TPanel.setLayout(new BoxLayout(TPanel,BoxLayout.X_AXIS)); this.connectionPerTopic.setLayout(new BoxLayout(connectionPerTopic,BoxLayout.X_AXIS)); this.connectionPerTopic.setAlignmentX(CENTER_ALIGNMENT); TPanel.add(connectionPerTopic); TPanel.add(Box.createHorizontalStrut(100)); this.topicChoice.setLayout(new BoxLayout(topicChoice,BoxLayout.X_AXIS)); TPanel.add(topicChoice); panel.add(TPanel); return panel; } }
/** * * @return JPanel that contains destination infos */ private Component createDestinationPane() { JPanel panel = new VerticalPanel(); //new BorderLayout(3, 0) this.mqttDestination.setLayout((new BoxLayout(mqttDestination, BoxLayout.X_AXIS))); panel.add(mqttDestination); JPanel TPanel = new JPanel(); TPanel.setLayout(new BoxLayout(TPanel,BoxLayout.X_AXIS)); this.connectionPerTopic.setLayout(new BoxLayout(connectionPerTopic,BoxLayout.X_AXIS)); this.connectionPerTopic.setAlignmentX(CENTER_ALIGNMENT); TPanel.add(connectionPerTopic); TPanel.add(Box.createHorizontalStrut(100)); this.topicChoice.setLayout(new BoxLayout(topicChoice,BoxLayout.X_AXIS)); TPanel.add(topicChoice); panel.add(TPanel); return panel; }
JPanel TPanel = new VerticalPanel(); TPanel.setLayout(new BoxLayout(TPanel, BoxLayout.X_AXIS)); timeout.setLayout(new BoxLayout(timeout, BoxLayout.X_AXIS)); typeQoSValue.setLayout(new BoxLayout(typeQoSValue, BoxLayout.X_AXIS)); TPanel.add(typeQoSValue);