Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VirtualTerminal crashes when using System LookAndFeel. #117

Open
StochasticTinkr opened this issue Jul 27, 2024 · 0 comments
Open

VirtualTerminal crashes when using System LookAndFeel. #117

StochasticTinkr opened this issue Jul 27, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@StochasticTinkr
Copy link

Describe the bug
When trying to use the VirtualTerminal, an error occurs if I've set the System LookAndFeel.

To Reproduce
Steps to reproduce the behavior. Run this kotlin file.

import com.varabyte.kotter.terminal.virtual.VirtualTerminal
import java.awt.EventQueue.invokeLater
import javax.swing.UIManager

fun main() {
    invokeLater {
        UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName())
    }
    VirtualTerminal.create()
}

Expected behavior
A virtual terminal appears, decorated with the System look and feel.

Screenshots

java.lang.Error: no ComponentUI class for: com.varabyte.kotter.terminal.virtual.SwingTerminalPane[,0,0,0x0,invalid,alignmentX=0.0,alignmentY=0.0,border=,flags=0,maximumSize=,minimumSize=,preferredSize=,caretColor=,disabledTextColor=,editable=true,margin=,selectedTextColor=,selectionColor=,kit=,typeHandlers=]
...
Caused by: java.lang.NullPointerException: Cannot invoke "javax.swing.plaf.TextUI.getMinimumSize(javax.swing.JComponent)" because "ui" is null

and

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: Cannot invoke "javax.swing.plaf.TextUI.getMinimumSize(javax.swing.JComponent)" because "ui" is null

Desktop:

  • OS: MacOS 12.7.5
  • Kotter Version: 1.1.2
  • JDK 21.0.1-open
  • Kotlin 2.0.0
@StochasticTinkr StochasticTinkr added the bug Something isn't working label Jul 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant