-
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.
-
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.....
-
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.
-
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
-
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.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks