Reading INI file to load up a JTree

M

Michael

Hi all,

I am new to JAVA SWING programming and right now I need to write a
JTree that will read my INI file (previously was written in VB) to
load up a tree structure.

The format of the INI file looks like this:

[R]
ChildsCount = 2
C1 = Enclosure(s)
C2 = JBOD(s)

[R\C1]
ChildsCount = 2
C1 = EnclosureWWN A
C2 = EnclosureWWN B

[R\C1\C1]
ChildsCount = 6
C1 = Power Supply
C2 = Fan
C3 = Battery
C4 = Numeric Sensor
C5 = Controller
C6 = Device Group(s)

[R\C1\C1\C1]
ChildsCount = 2
C1 = PSU0
C2 = PSU1

[R\C1\C1\C2]
ChildsCount = 2
C1 = Fan0
C2 = Fan1

[R\C1\C1\C3]
ChildsCount = 2
C1 = UPS
C2 = Motherboard

[R\C1\C1\C4]
ChildsCount = 3
C1 = NS0
C2 = NS1
C3 = NS2

[R\C1\C1\C5]
ChildsCount = 2
C1 = ControllerWWN A
C2 = ControllerWWN B

[R\C1\C1\C6]
ChildsCount = 7
C1 = Device Group A
C2 = Device Group B
C3 = Device Group C
C4 = Device Group D
C5 = Device Group E
C6 = Device SubGroup A
C7 = Device SubGroup B

[R\C1\C1\C6\C1]
ChildsCount = 3
C1 = Volume 1
C2 = Volume 2
C3 = Volume 3

[R\C1\C1\C6\C1\C1]
ChildsCount = 2
C1 = LUN0
C2 = LUN1

[R\C1\C1\C6\C1\C1\C1]
ChildsCount = 4
C1 = Host A
C2 = Host B
C3 = Host C
C4 = Host D

[R\C1\C1\C6\C1\C1\C2]
ChildsCount = 2
C1 = Host A
C2 = Host C

Hope someone can help me out here.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,818
Latest member
Brigette36

Latest Threads

Top