Hey there,
to create a spinner, first create its model and then pass the model to the JSpinner constructor.
In Java it should look something like this:
|
Source code
|
1
2
3
4
5
|
String[] monthStrings = { "Januar", "Februar", "März", "April", "Mai", "Juni",
"Juli", "August", "September", "Oktober", "November", "Dezember"};
//Edit: ..deleted one line!!
SpinnerListModel monthModel = New SpinnerListModel(monthStrings);
JSpinner spinner = New JSpinner(monthModel);
|
Now I am trying to achieve the same in Jabaco!
It throws an error though:
|
Jabaco Source
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
Option Explicit
Import javax#swing#SpinnerListModel
Public Sub Form_Load()
Dim sArray() As String
sArray() = Split("Januar,Februar,März,April,Mai,Juni,Juli,August,September,Oktober,November,Dezember",",")
'ERROR: Auto conversion 'String()' to 'java/lang/Object()' is not supported!
Dim slm As New SpinnerListModel(sArray())
Dim Spinner1 As JSpinner = New JSpinner(slm)
Me.add(Spinner1)
Spinner1.setBounds 10,10,100,20
End Sub
|
Dim slm As New SpinnerListModel(...expects... 'arg2 As List'
...seems to expect an object / List
I am not quite sure what to do with that?
Any thoughts?
Thanks,
Dani