Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

match parenthesis on mouse click  RSS feed

 
Himani Vashistha
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I want to create a swing application, in which I can match the parenthis on mouse click(same like any IDE like eclipse). I want to know How can I implement it in swings, I am a beginer in Swings.

Please Help!

Thanks,
Himani
 
Campbell Ritchie
Marshal
Posts: 55698
163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
  • A recursive method called whenever you enter a (.
  • A count of ( entered, reduced by 1 whenever you click; if (parenthesisCoutn > 0) builder.append(")");
  • Those any use?
     
    Himani Vashistha
    Greenhorn
    Posts: 8
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Hi,

    Thanks!
    But I want to know how can I show the the text area selected, till the matching parenthis?

    Regards,
    Himani
     
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!