You are not logged in.

birosys

Trainee

  • "birosys" is male
  • "birosys" started this thread

Posts: 48

Date of registration: Feb 9th 2009

Location: Mladenovac, Serbia

Occupation: Programming

Hobbies: Programming

  • Send private message

1

Sunday, August 30th 2009, 2:23am

JFormattedTextField

Hello,

I try to use JFormattedTextField with this code:

Public Sub Form_Load()
Dim DatF As java#text#DateFormat= New java#text#SimpleDateFormat ("dd-MM-yyyy")
Dim df As javax#swing#text#DateFormatter=New javax#swing#text#DateFormatter(DatF)
Dim tf As javax#swing#JFormattedTextField=Newjavax#swing#JFormattedTextField(df)
tf.SetBounds(10,10,100,20)
Me.add tf
End Sub



... and i got class descriptor.

Can anyone try this code, and tell me a result?

Thanks

Milan

PS:
tags dont work with Google Chrome :cursing:

  • "StefanSchnell" is male

Posts: 102

Date of registration: Mar 13th 2009

Location: Oberirsen - Germany

Occupation: Senior Software Engineer

Hobbies: Programming aund Photography

  • Send private message

2

Sunday, September 13th 2009, 8:04pm

Hi Milan,
I get the same result as you.

Jabaco Source

1
2
3
4
5
6
7
8
9
10
11
12
13
Public Sub Form_Load()

  Dim DatF As java#text#DateFormat = New java#text#SimpleDateFormat ("dd-MM-yyyy")
  Dim df As javax#swing#text#DateFormatter = New javax#swing#text#DateFormatter(DatF)
  Dim tf As javax#swing#JFormattedTextField = New javax#swing#JFormattedTextField(df)

  tf.setBounds(10,10,300,20)
  Me.add tf

  d = Format$(Now, "dd-mm-yyyy")
  tf.setValue(DatF.format(d))

End Sub


I add two lines to your code to see the actual date, but I do not know what you expected.

Cheers
Stefan
Visit my personal or commercial site
If you have questions or suggestions, write me an eMail or
meet me here

birosys

Trainee

  • "birosys" is male
  • "birosys" started this thread

Posts: 48

Date of registration: Feb 9th 2009

Location: Mladenovac, Serbia

Occupation: Programming

Hobbies: Programming

  • Send private message

3

Sunday, September 13th 2009, 11:10pm

Hi Stefan

Thanks for your response.
I expected something like this
To create my own format, for easy validating user inputs.

Milan

Rate this thread
WoltLab Burning Board