summaryrefslogtreecommitdiff
path: root/BKUGuiExt/src/main/java/at/gv
diff options
context:
space:
mode:
authortkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2012-05-30 08:39:24 +0000
committertkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2012-05-30 08:39:24 +0000
commitde212c1301e08f717ecc326485a5d634d1ab6148 (patch)
tree56044d05b4afd2c90ed9dd9afe4fd9c2e1f67e4a /BKUGuiExt/src/main/java/at/gv
parent61dfbb46ee9bce9c417b8508460a7cb9e052054d (diff)
downloadmocca-de212c1301e08f717ecc326485a5d634d1ab6148.tar.gz
mocca-de212c1301e08f717ecc326485a5d634d1ab6148.tar.bz2
mocca-de212c1301e08f717ecc326485a5d634d1ab6148.zip
As of JDK 1.7, getTitleFont() sometimes return null - guard for that
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@1080 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'BKUGuiExt/src/main/java/at/gv')
-rw-r--r--BKUGuiExt/src/main/java/at/gv/egiz/bku/gui/GetHardwareInfoGUI.java20
1 files changed, 11 insertions, 9 deletions
diff --git a/BKUGuiExt/src/main/java/at/gv/egiz/bku/gui/GetHardwareInfoGUI.java b/BKUGuiExt/src/main/java/at/gv/egiz/bku/gui/GetHardwareInfoGUI.java
index d4fbf900..e6265a07 100644
--- a/BKUGuiExt/src/main/java/at/gv/egiz/bku/gui/GetHardwareInfoGUI.java
+++ b/BKUGuiExt/src/main/java/at/gv/egiz/bku/gui/GetHardwareInfoGUI.java
@@ -92,17 +92,19 @@ public class GetHardwareInfoGUI extends CardMgmtGUI implements
backButton.addActionListener(hardwareinfolistener);
backButton.setEnabled(true);
- readerpanel_border = new TitledBorder(null, getMessage(LABEL_CARDREADER), TitledBorder.LEADING, TitledBorder.TOP, null, null);
- readerpanel_border.setTitleFont(readerpanel_border.getTitleFont().deriveFont(
- readerpanel_border.getTitleFont().getStyle()
- & java.awt.Font.BOLD));
+ readerpanel_border = new TitledBorder(null, getMessage(LABEL_CARDREADER), TitledBorder.LEADING, TitledBorder.TOP, null, null);
+ if (readerpanel_border.getTitleFont() != null)
+ readerpanel_border.setTitleFont(readerpanel_border.getTitleFont().deriveFont(
+ readerpanel_border.getTitleFont().getStyle()
+ & java.awt.Font.BOLD));
readerpanel = new JPanel();
readerpanel.setBorder(readerpanel_border);
cardpanel_border = new TitledBorder(null, getMessage(LABEL_SMARTCARD), TitledBorder.LEADING, TitledBorder.TOP, null, null);
- cardpanel_border.setTitleFont(cardpanel_border.getTitleFont().deriveFont(
- cardpanel_border.getTitleFont().getStyle()
- & java.awt.Font.BOLD));
+ if (cardpanel_border.getTitleFont() != null)
+ cardpanel_border.setTitleFont(cardpanel_border.getTitleFont().deriveFont(
+ cardpanel_border.getTitleFont().getStyle()
+ & java.awt.Font.BOLD));
cardpanel = new JPanel();
cardpanel.setBorder(cardpanel_border);
cardpanel.setFont(cardpanel.getFont().deriveFont(
@@ -272,12 +274,12 @@ public class GetHardwareInfoGUI extends CardMgmtGUI implements
(float) ((baseFontSize - 2)* factor)));
}
- if (cardpanel_border != null) {
+ if (cardpanel_border != null && cardpanel_border.getTitleFont() != null) {
cardpanel_border.setTitleFont(cardpanel_border.getTitleFont().deriveFont(
(float) ((baseFontSize)* factor)));
}
- if (readerpanel_border != null) {
+ if (readerpanel_border != null && readerpanel_border.getTitleFont() != null) {
readerpanel_border.setTitleFont(readerpanel_border.getTitleFont().deriveFont(
(float) ((baseFontSize)* factor)));
}