Seems like it won't work with JScrollPane or ScrollPane?
Opened this issue · 0 comments
ve3344 commented
Seems like it won't work with JScrollPane or ScrollPane?
Here is an example:
fun main() {
val content = JPanel().apply {
layout = LinearLayout(LinearLayout.VERTICAL)
for (i in 0..3){
add(JButton("a"), LinearConstraints().apply {
width = 100
height = 60
})
}
}
JFrame().apply {
layout = LinearLayout(LinearLayout.VERTICAL)
add(JScrollPane(content), LinearConstraints().apply {
width = 200
height = 200
})
size = Dimension(300, 300)
defaultCloseOperation = WindowConstants.EXIT_ON_CLOSE
isVisible = true
}
}