~ubuntu-branches/ubuntu/maverick/proguard/maverick

« back to all changes in this revision

Viewing changes to src/proguard/gui/TabbedPane.java

  • Committer: Bazaar Package Importer
  • Author(s): Sam Clegg, Onkar Shinde, Sam Clegg
  • Date: 2009-10-09 16:17:49 UTC
  • mfrom: (1.2.3 upstream) (3.1.6 karmic)
  • Revision ID: james.westby@ubuntu.com-20091009161749-qjk059y5r792co7c
Tags: 4.4-1
[ Onkar Shinde ]
* Merge from Ubuntu. (Closes: #534029, #548810)

[ Sam Clegg ]
* Thanks Onkar for the above fixes!
* New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 * ProGuard -- shrinking, optimization, obfuscation, and preverification
3
3
 *             of Java bytecode.
4
4
 *
5
 
 * Copyright (c) 2002-2008 Eric Lafortune (eric@graphics.cornell.edu)
 
5
 * Copyright (c) 2002-2009 Eric Lafortune (eric@graphics.cornell.edu)
6
6
 *
7
7
 * This program is free software; you can redistribute it and/or modify it
8
8
 * under the terms of the GNU General Public License as published by the Free
155
155
        imageConstraints.fill    = GridBagConstraints.BOTH;
156
156
        imageConstraints.anchor  = GridBagConstraints.SOUTHWEST;
157
157
 
158
 
        JPanel component = new JPanel()
159
 
        {
160
 
            public void paintComponent(Graphics graphics)
161
 
            {
162
 
                graphics.drawImage(image, 0, getHeight() - image.getHeight(null), this);
163
 
            }
164
 
        };
165
 
        component.setBorder(BorderFactory.createEtchedBorder());
 
158
        JButton component = new JButton(new ImageIcon(image));
 
159
        component.setFocusPainted(false);
 
160
        component.setFocusable(false);
 
161
        component.setRequestFocusEnabled(false);
 
162
        component.setRolloverEnabled(false);
 
163
        component.setMargin(new Insets(0, 0, 0, 0));
 
164
        component.setHorizontalAlignment(JButton.LEFT);
 
165
        component.setVerticalAlignment(JButton.BOTTOM);
 
166
        component.setPreferredSize(new Dimension(0, 0));
166
167
 
167
168
        add(component, imageConstraints);
168
169