From 9046ce5cb9df2cdb379bc460dfd23e00f96e51f3 Mon Sep 17 00:00:00 2001 From: Chirag Manwani Date: Wed, 17 Feb 2016 19:54:52 +0530 Subject: tdf#97642 Use native theming for swing controls in Beanshell Editor Change-Id: Ifb2f3cfe5132e9b6f7d5d2df5868b09b39c5ec47 Reviewed-on: https://gerrit.libreoffice.org/22429 Tested-by: Jenkins Reviewed-by: Chris Sherlock --- .../star/script/framework/provider/beanshell/PlainSourceView.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'scripting') diff --git a/scripting/java/com/sun/star/script/framework/provider/beanshell/PlainSourceView.java b/scripting/java/com/sun/star/script/framework/provider/beanshell/PlainSourceView.java index 91e7b9144ca4..916234af939d 100644 --- a/scripting/java/com/sun/star/script/framework/provider/beanshell/PlainSourceView.java +++ b/scripting/java/com/sun/star/script/framework/provider/beanshell/PlainSourceView.java @@ -30,6 +30,7 @@ import javax.swing.JScrollPane; import javax.swing.JTextArea; import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentListener; +import javax.swing.UIManager; import javax.swing.text.BadLocationException; public class PlainSourceView extends JScrollPane implements @@ -93,6 +94,12 @@ public class PlainSourceView extends JScrollPane implements } private void initUI() { + try{ + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + } + catch(Exception e){ + // What to do here + } ta = new JTextArea(); ta.setRows(15); ta.setColumns(40); -- cgit