| |

VerySource

 Forgot password?
 Register
Search
View: 1106|Reply: 1

How to display the picture and draw line above?

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2021-4-25 16:30:01
| Show all posts |Read mode
I want to display a picture on the form, and can play a small sound file (format is .WAV) while displaying the picture. Then you can draw a line on the image, set the line wide and line. colour. Thank you
Reply

Use magic Report

1

Threads

51

Posts

32.00

Credits

Newbie

Rank: 1

Credits
32.00

 China

Post time: 2021-4-25 16:45:01
| Show all posts
Panel on the g2.drawimage. g2.drawline ()
The music code is as follows
Import javax.swing.swingutilities;
Import java.applet. *;
Import java.net.URL;
Class test {
        Public static void main (String [] args) {
             Swingutilities.invokelater (new runnable () {
          Public void run () {
              Try {
                  Audioclip ac = applet.newaudioClip (New URL ("File: / C: /Windows.wav");
                   Ac.loop ();
              } catCH (Exception Exception) {
                  Exception.printStackTrace ();
              }

          }
        
        });
        }
}
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list