Skip to content

Seems like it won't work with JScrollPane or ScrollPane? #3

@ve3344

Description

@ve3344

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
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions