only:JScrollPane

This commit is contained in:
rusefillc 2024-08-18 19:32:37 -04:00
parent d4c2038bda
commit 0547a0211e
1 changed files with 6 additions and 1 deletions

View File

@ -23,7 +23,12 @@ public class PcanConnectorUI {
JPanel panel = new JPanel(new BorderLayout());
panel.add(new JLabel("Running PCAN connector for TS: RX on " + Integer.toString(Fields.CAN_ECU_SERIAL_RX_ID, 16)), BorderLayout.NORTH);
JTextArea logTextArea = new JTextArea();
panel.add(logTextArea, BorderLayout.CENTER);
JPanel panelForScroll = new JPanel(new BorderLayout());
panelForScroll.add(logTextArea, BorderLayout.CENTER);
JScrollPane scrollPane = new JScrollPane(panelForScroll, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
panel.add(scrollPane, BorderLayout.CENTER);
StatusConsumer statusConsumer = (string, breakLineOnTextArea, sendToLogger) -> SwingUtilities.invokeLater(() -> {
if (sendToLogger) {