protected JPanel createButtonPanel() { JPanel bottom = new JPanel(); bottom.setLayout(new BorderLayout()); // bottom.setLayout( new BoxLayout( bottom, BoxLayout.X_AXIS ) ); bottom.setBorder(BorderFactory.createEmptyBorder(17, 12, 11, 11)); // bottom.add( Box.createHorizontalStrut()); cancelButton = new ButtonWithMnemonic(MailResourceLoader.getString( "global", "cancel")); //$NON-NLS-1$ //$NON-NLS-2$ cancelButton.addActionListener(this); cancelButton.setActionCommand("CANCEL"); //$NON-NLS-1$ okButton = new ButtonWithMnemonic(MailResourceLoader.getString( "global", "ok")); //$NON-NLS-1$ //$NON-NLS-2$ okButton.addActionListener(this); okButton.setActionCommand("OK"); //$NON-NLS-1$ okButton.setDefaultCapable(true); dialog.getRootPane().setDefaultButton(okButton); helpButton = new ButtonWithMnemonic(MailResourceLoader.getString( "global", "help")); //$NON-NLS-1$ //$NON-NLS-2$ JPanel buttonPanel = new JPanel(); buttonPanel.setLayout(new GridLayout(1, 3, 5, 0)); buttonPanel.add(okButton); buttonPanel.add(cancelButton); buttonPanel.add(helpButton); // bottom.add( Box.createHorizontalGlue() ); bottom.add(buttonPanel, BorderLayout.EAST); return bottom;
protected JPanel createButtonPanel() { JPanel bottom = new JPanel(); bottom.setLayout(new BorderLayout()); //bottom.setLayout( new BoxLayout( bottom, BoxLayout.X_AXIS ) ); bottom.setBorder(BorderFactory.createEmptyBorder(17, 12, 11, 11)); //bottom.add( Box.createHorizontalStrut()); cancelButton = new ButtonWithMnemonic(MailResourceLoader.getString( "global", "cancel")); //$NON-NLS-1$ //$NON-NLS-2$ cancelButton.addActionListener(this); cancelButton.setActionCommand("CANCEL"); //$NON-NLS-1$ okButton = new ButtonWithMnemonic(MailResourceLoader.getString( "global", "ok")); //$NON-NLS-1$ //$NON-NLS-2$ okButton.addActionListener(this); okButton.setActionCommand("OK"); //$NON-NLS-1$ okButton.setDefaultCapable(true); getRootPane().setDefaultButton(okButton); helpButton = new ButtonWithMnemonic(MailResourceLoader.getString( "global", "help")); //$NON-NLS-1$ //$NON-NLS-2$ JPanel buttonPanel = new JPanel(); buttonPanel.setLayout(new GridLayout(1, 3, 5, 0)); buttonPanel.add(okButton); buttonPanel.add(cancelButton); buttonPanel.add(helpButton); //bottom.add( Box.createHorizontalGlue() ); bottom.add(buttonPanel, BorderLayout.EAST); return bottom;
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/util/PGPPassphraseDialog.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/util/PasswordDialog.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
protected JPanel createButtonPanel() {
1
protected JPanel createButtonPanel() {
2
		JPanel bottom = new JPanel();
2
		JPanel bottom = new JPanel();
3
		bottom.setLayout(new BorderLayout());
3
		bottom.setLayout(new BorderLayout());
4
		// bottom.setLayout( new BoxLayout( bottom, BoxLayout.X_AXIS ) );
4
		//bottom.setLayout( new BoxLayout( bottom, BoxLayout.X_AXIS ) );
5
		bottom.setBorder(BorderFactory.createEmptyBorder(17, 12, 11, 11));
5
		bottom.setBorder(BorderFactory.createEmptyBorder(17, 12, 11, 11));
6
		// bottom.add( Box.createHorizontalStrut());
6
		//bottom.add( Box.createHorizontalStrut());
7
		cancelButton = new ButtonWithMnemonic(MailResourceLoader.getString(
7
		cancelButton = new ButtonWithMnemonic(MailResourceLoader.getString(
8
				"global", "cancel"));
8
				"global", "cancel"));
9
		//$NON-NLS-1$ //$NON-NLS-2$
9
		//$NON-NLS-1$ //$NON-NLS-2$
10
		cancelButton.addActionListener(this);
10
		cancelButton.addActionListener(this);
11
		cancelButton.setActionCommand("CANCEL"); //$NON-NLS-1$
11
		cancelButton.setActionCommand("CANCEL"); //$NON-NLS-1$
12
		okButton = new ButtonWithMnemonic(MailResourceLoader.getString(
12
		okButton = new ButtonWithMnemonic(MailResourceLoader.getString(
13
				"global", "ok"));
13
				"global", "ok"));
14
		//$NON-NLS-1$ //$NON-NLS-2$
14
		//$NON-NLS-1$ //$NON-NLS-2$
15
		okButton.addActionListener(this);
15
		okButton.addActionListener(this);
16
		okButton.setActionCommand("OK"); //$NON-NLS-1$
16
		okButton.setActionCommand("OK"); //$NON-NLS-1$
17
		okButton.setDefaultCapable(true);
17
		okButton.setDefaultCapable(true);
18
		dialog.getRootPane().setDefaultButton(okButton);
18
		getRootPane().setDefaultButton(okButton);
19
		helpButton = new ButtonWithMnemonic(MailResourceLoader.getString(
19
		helpButton = new ButtonWithMnemonic(MailResourceLoader.getString(
20
				"global", "help"));
20
				"global", "help"));
21
		//$NON-NLS-1$ //$NON-NLS-2$
21
		//$NON-NLS-1$ //$NON-NLS-2$
22
		JPanel buttonPanel = new JPanel();
22
		JPanel buttonPanel = new JPanel();
23
		buttonPanel.setLayout(new GridLayout(1, 3, 5, 0));
23
		buttonPanel.setLayout(new GridLayout(1, 3, 5, 0));
24
		buttonPanel.add(okButton);
24
		buttonPanel.add(okButton);
25
		buttonPanel.add(cancelButton);
25
		buttonPanel.add(cancelButton);
26
		buttonPanel.add(helpButton);
26
		buttonPanel.add(helpButton);
27
		// bottom.add( Box.createHorizontalGlue() );
27
		//bottom.add( Box.createHorizontalGlue() );
28
		bottom.add(buttonPanel, BorderLayout.EAST);
28
		bottom.add(buttonPanel, BorderLayout.EAST);
29
		return bottom;
29
		return bottom;
30
	
30
	
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0