mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
hack to get the scrollbar to line up properly
This commit is contained in:
@@ -20,6 +20,7 @@ import java.util.Arrays;
|
||||
import java.util.Enumeration;
|
||||
import java.util.Vector;
|
||||
|
||||
import javax.swing.border.EmptyBorder;
|
||||
import javax.swing.event.*;
|
||||
import javax.swing.text.*;
|
||||
import javax.swing.undo.*;
|
||||
@@ -134,6 +135,8 @@ public class JEditTextArea extends JComponent
|
||||
add(painter, BorderLayout.CENTER);
|
||||
add(vertical = new JScrollBar(Adjustable.VERTICAL), BorderLayout.EAST);
|
||||
add(horizontal = new JScrollBar(Adjustable.HORIZONTAL), BorderLayout.SOUTH);
|
||||
// what a dreadful hack to get the scrollbar to align
|
||||
horizontal.setBorder(new EmptyBorder(0, 0, 0, vertical.getPreferredSize().width));
|
||||
|
||||
/*
|
||||
// this fixes the glitch at the lower-right of the scrollbars,
|
||||
|
||||
Reference in New Issue
Block a user