Pontus Posted January 4, 2010 at 12:52 PM Report Share #304030 Posted January 4, 2010 at 12:52 PM Boas Tenho um JPanel com 10 ou 11 componentes (JTextFields e Jcombobox's). Como lhe adiciono uma scrollbar vertical? ando aqui às voltas mas não estou a conseguir. Já agora, o que é melhor? uma scrollbar ou um jScrollPane? Obrigado Link to comment Share on other sites More sharing options...
Knitter Posted January 4, 2010 at 07:15 PM Report Share #304109 Posted January 4, 2010 at 07:15 PM Uma ScrollBar é apenas uma barra, vertical ou horizontal, que permite escolher valores num intervalo, não é um componente para fazer o "scroll" de conteúdo. Se queres que um determinado painel tenha scroll tens de colocar esse painel dentro de um JScrollPane. www.sergiolopes.eu Link to comment Share on other sites More sharing options...
Pontus Posted January 6, 2010 at 01:31 PM Author Report Share #304457 Posted January 6, 2010 at 01:31 PM Já consegui. O problema de trabalhar com o Netbeans é aprender as manhas dele. Como eu tenho um mainPanel na aplicação estava a esquecer-me de fazer add ao JScrollPane. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now