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. Java Graphics and Desktop

Java Graphics and Desktop

Scheduled Pinned Locked Moved Java
tutorialjavacomgraphicsgame-dev
6 Posts 2 Posters 0 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.
  • S Offline
    S Offline
    sharkbc
    wrote on last edited by
    #1

    Hi Member ! I think you have sometime played this game http://brianx.com/downloads/fdd.exe[^] This game help us to draw many things to the desktop. I've got some question: 1.We always use JFrame,JWindow,JPanel,... to load image, draw graphics object(circle,bar,line,...) and our application always accompanied the Parent Component(JFrame,JWindow,JPanel,...). So if we want to draw graphic objects(cicle,bar,line,...) on the desktop without JFrame,JWindow,JPanel,...using Java. Can we do it and how to do. If can, please give me some example java code. Thanks and regards sharkbc

    4 1 Reply Last reply
    0
    • S sharkbc

      Hi Member ! I think you have sometime played this game http://brianx.com/downloads/fdd.exe[^] This game help us to draw many things to the desktop. I've got some question: 1.We always use JFrame,JWindow,JPanel,... to load image, draw graphics object(circle,bar,line,...) and our application always accompanied the Parent Component(JFrame,JWindow,JPanel,...). So if we want to draw graphic objects(cicle,bar,line,...) on the desktop without JFrame,JWindow,JPanel,...using Java. Can we do it and how to do. If can, please give me some example java code. Thanks and regards sharkbc

      4 Offline
      4 Offline
      4277480
      wrote on last edited by
      #2

      Ive seen some videos on youtube, inorder to replicate this program you need to: 1. get the desktop screenshot 2. use java2d for the animation http://java.sun.com/products/java-media/2D/index.jsp[^] http://www.apl.jhu.edu/~hall/java/Java2D-Tutorial.html[^] http://zetcode.com/tutorials/javagamestutorial/[^]

      S 1 Reply Last reply
      0
      • 4 4277480

        Ive seen some videos on youtube, inorder to replicate this program you need to: 1. get the desktop screenshot 2. use java2d for the animation http://java.sun.com/products/java-media/2D/index.jsp[^] http://www.apl.jhu.edu/~hall/java/Java2D-Tutorial.html[^] http://zetcode.com/tutorials/javagamestutorial/[^]

        S Offline
        S Offline
        sharkbc
        wrote on last edited by
        #3

        Hi ! I can do alot of thing with java2d but my problem that how can i draw these graphic objects to the desktop. You show me 2 step: 1.get the desktop screenshot-->How to do it--> with link you provide? 2.use java2d for the animation. Yes, i can do alot of thing with java2d. The example i need that draw circle or rect,... to the desktop not to any JComponent or draw these graphics objects to the JComponent but when the program running i need see only the graphics objects(as the same the game i gave you the link before). If you understand me, please help? Sorry because my(not very good) English. Thanks and regards !

        S 1 Reply Last reply
        0
        • S sharkbc

          Hi ! I can do alot of thing with java2d but my problem that how can i draw these graphic objects to the desktop. You show me 2 step: 1.get the desktop screenshot-->How to do it--> with link you provide? 2.use java2d for the animation. Yes, i can do alot of thing with java2d. The example i need that draw circle or rect,... to the desktop not to any JComponent or draw these graphics objects to the JComponent but when the program running i need see only the graphics objects(as the same the game i gave you the link before). If you understand me, please help? Sorry because my(not very good) English. Thanks and regards !

          S Offline
          S Offline
          sharkbc
          wrote on last edited by
          #4

          Hi all! I can do the same action with the game i gave you before. with 2step that Member gave us: 1.capture the desktop the screen shot. 2.put this picture to the background of the container. 3.Draw animation. But when the game running, we can't impact to any thing on the desktop. I need another solution that we can impact to icon on the desktop. Can anybody help me.? Regards !

          4 1 Reply Last reply
          0
          • S sharkbc

            Hi all! I can do the same action with the game i gave you before. with 2step that Member gave us: 1.capture the desktop the screen shot. 2.put this picture to the background of the container. 3.Draw animation. But when the game running, we can't impact to any thing on the desktop. I need another solution that we can impact to icon on the desktop. Can anybody help me.? Regards !

            4 Offline
            4 Offline
            4277480
            wrote on last edited by
            #5

            I dont think that it is possible, because even the game does what I told you about but the trick here is to use the toolkit method in java and set the size of the frame to the size of the screen.

            S 1 Reply Last reply
            0
            • 4 4277480

              I dont think that it is possible, because even the game does what I told you about but the trick here is to use the toolkit method in java and set the size of the frame to the size of the screen.

              S Offline
              S Offline
              sharkbc
              wrote on last edited by
              #6

              I think we can. Because the fullscreen may be created by alot of subscreen. With the way we told, ofcourse it is not posible. But we can do this by another way. We do not set fullscreen for my game, So the game may be created by alot of screen(use one screen for an animation) The transparency solution help us to do this(JKD 6.U10) Regards !

              modified on Friday, September 25, 2009 10:13 PM

              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