How to add buttons using Graphics2D?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • KiranJyothi
    New Member
    • Apr 2007
    • 45

    How to add buttons using Graphics2D?

    Hi All,

    I want to draw some rectangles and then add some buttons. Actually, in my project I have to give user control. This project is about transmitting and receiving packets. When the user presses "Transmit" button, packets should move from transmitter side to receiver side. I am able to draw the rectangles (packets). But, not able to add the buttons. PLEASE let me know if I can add buttons using Graphics2D.

    Thanks in advance.

    KiranJyothi
  • Dököll
    Recognized Expert Top Contributor
    • Nov 2006
    • 2379

    #2
    I did not write below, and you probably have seen this already, but see if you can get an idea there, if you're still searching:

    [ please no spoonfeeding and certainly not by using other people's code without
    giving credits - mod ]

    Comment

    • BigDaddyLH
      Recognized Expert Top Contributor
      • Dec 2007
      • 1216

      #3
      To "add buttons", why not use Swing?

      This Swing Java Tutorial describes developing graphical user interfaces (GUIs) for applications and applets using Swing components

      Comment

      Working...