Using Java Swing: Which Components to use


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 6 of 6

Thread: Using Java Swing: Which Components to use

Hybrid View

  1. #1
    Join Date
    Jul 2005
    Posts
    23

    Question Using Java Swing: Which Components to use

    Hi,

    I need a guide here. I want to develop a program to simulate a simple logic circuit (AND, OR, NAND, NOR, XOR, XNOR gates). Here are the properties of the program These gates are images:


    There is a dialog box containing all the gates where I can select which gate to use and drag it onto the display area.
    The gates on the display area can be connected through lines.
    The circuit can accept input bits
    The circuit can compute the output bits given the input bits
    I can open an input file (probably XML) that contains a circuit and display it on the display area and run simulation on it.

    • There is a dialog box containing all the gates where I can select which gate to use and drag it onto the display area.
    • The gates on the display area can be connected through lines.
    • The circuit can accept input bits
    • The circuit can compute the output bits given the input bits
    • I can open an input file (probably XML) that contains a circuit and display it on the display area and run simulation on it.


    So, what Java Swing components that I can use to display the circuit?

    What component of Java Swing that support XML file manipulation?

    Any other advice

    Thank you.

  2. #2
    Join Date
    May 2005
    Posts
    9
    to tell you the truth, I've no idead how to acomlish that using Java,
    but it's quite easy to do using 'Virtual Basic 6.0'.
    (hope I won't get sacked for saying that in Java forum.....

  3. #3
    Join Date
    Oct 2004
    Posts
    311
    This should be possible using Swing, although it will be a challenge to get it right.
    What you need to look into is the Drag-And-Drop classes. These facilitate the draging from the dialog box to the display area.
    For the display area itself, you might want to extend the existing JPanel class. That way, you;ll be able to override the paint method to do what you want it to do.

  4. #4
    Join Date
    Jul 2005
    Posts
    23
    Hmmm... seems like a big challenge to me.

    However, thank you very much for your responses. Ill try to think of it. At least I got some ideas how to deal with it... Thank you very much

  5. #5
    Join Date
    Oct 2004
    Posts
    311
    If I had more free time on my hands, I'd be willing to help out more. But as it stands now that won't be possible.

  6. #6
    Join Date
    Mar 2004
    Posts
    635

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center