Adapter Classes In JAVA

Hey tech readers, welcome to our blog. Today I Will be explaining about Adapter Classes in Java.

Now you might be having a number of questions in your mind…What are Adapter classes..? Where they are used..? How they are used….? And so on…

Don’t worry I will be answering all these questions.

Let’s get started,

This class provides the default modification of all methods of an interface, because of this we don’t need to modify all the methods of the interface. It also reduces the burden of writing complex code☺. These are found in java.awt.event, java.awt.dnd and javax.swing.event packages.

There are different kinds of adapter classes which are as follows:-

  • java.awt.event Adapter classes

  1. WindowAdapter
  2. WindowAdapter
  3. KeyAdapter
  4. MouseAdapter
  5. MouseMotionAdapter
  6. FocusAdapter
  7. ComponentAdapter
  8. ContainerAdapter
  9. Hierarchy Bounds Adapter
  • java.awt.dnd Adapter classes

  1. DragSource Adapter
  2. DragTargetAdapter
  • javax.swing.event Adapter classes

  1. MouseInputAdapter
  2. Internal Frame Adapter

Following is one of the example showing usage of Adapters

Java WindowAdapter Example

Adapter classes

Output:- Adapter classes

I hope you guys surely must have learnt something about Adapter classes now and also you enjoyed reading it.

Wish to see you guys in our next blog.  

Happy Learning !!

12 thoughts on “Adapter Classes In JAVA

  1. I love your blog.. very nice colors & theme. Did you create this website yourself? Plz reply back as I’m looking to create my own blog and would like to know wheere u got this from. thanks

  2. I’m writing to let you know of the perfect encounter my princess found going through the blog. She picked up a good number of details, which include how it is like to have a wonderful giving heart to make many people without difficulty know a variety of impossible topics. You really did more than my expected results. I appreciate you for providing such warm and helpful, dependable, educational as well as easy tips on this topic to Evelyn.

  3. Thank you for the good writeup. It in fact was a amusement account it. Look advanced to more added agreeable from you! However, how could we communicate?

  4. Thanks for sharing excellent informations. Your web-site is very cool. I am impressed by the details that you have on this web site. It reveals how nicely you understand this subject. Bookmarked this web page, will come back for more articles. You, my pal, ROCK! I found simply the information I already searched all over the place and just couldn’t come across. What an ideal web-site.

  5. Great write-up, I am regular visitor of one¡¦s blog, maintain up the nice operate, and It is going to be a regular visitor for a long time.

  6. I’d must examine with you here. Which is not one thing I normally do! I take pleasure in reading a post that will make people think. Also, thanks for allowing me to comment!

  7. Hey There. I found your blog using msn. This is a very well written article. I will make sure to bookmark it and return to read more of your useful info. Thanks for the post. I’ll certainly return.

  8. Wow, superb weblog format! How lengthy have you ever been running a blog for? you made running a blog look easy. The entire glance of your site is fantastic, as neatly as the content material!

  9. I really appreciate this post. I’ve been looking all over for this! Thank goodness I found it on Bing. You’ve made my day! Thx again!

  10. Good site! I truly love how it is simple on my eyes and the data are well written. I’m wondering how I could be notified when a new post has been made. I’ve subscribed to your RSS which must do the trick! Have a great day!

Leave a Reply

Your email address will not be published. Required fields are marked *