Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Java
  4. Is it possible to draw graphics on JButtons?

Is it possible to draw graphics on JButtons?

Scheduled Pinned Locked Moved Java
graphicsquestion
3 Posts 2 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Reagan Conservative
    wrote on last edited by
    #1

    I believe this is OK. I need to know if it is possible to draw graphics based on various conditions during run-time, but want some advice before I proceed further. Thanks.

    AF Pilot

    N 1 Reply Last reply
    0
    • R Reagan Conservative

      I believe this is OK. I need to know if it is possible to draw graphics based on various conditions during run-time, but want some advice before I proceed further. Thanks.

      AF Pilot

      N Offline
      N Offline
      Nagy Vilmos
      wrote on last edited by
      #2

      You should be able to get the graphic object jButton.getGraphic() and manipulate it as you need. You should handle it during the refresh of the form as that ensures it is done at the right time.


      Panic, Chaos, Destruction. My work here is done.

      R 1 Reply Last reply
      0
      • N Nagy Vilmos

        You should be able to get the graphic object jButton.getGraphic() and manipulate it as you need. You should handle it during the refresh of the form as that ensures it is done at the right time.


        Panic, Chaos, Destruction. My work here is done.

        R Offline
        R Offline
        Reagan Conservative
        wrote on last edited by
        #3

        Thank you, Nagy!

        AF Pilot

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups