A circuit simulator based on Java