How to add JList in JTextArea
Hi,
I am making an editor in java, like other editors I want that when anyone type a keyword or something like, consider this
JOptionPane.
then a list box should popup with all the options forJOptionPane.
Hi,
I am making an editor in java, like other editors I want that when anyone type a keyword or something like, consider this
JOptionPane.
then a list box should popup with all the options forJOptionPane.
> Hi,
> I am making an editor in java, like other editors I
> want that when anyone type a keyword or something
> like, consider this
> > JOptionPane.
>
> then a list box should popup with all the options for
> JOptionPane.
You mean like the same features that you get with IDE's like Eclipse, Netbeans etc? Auto suggestions? Like it would list all the methods available for JOptionpane?
I am not sure how it is implemented in Eclipse or others but for me it is a JPopupmenu with a scrollbar.
Here is a sample
http://www.beginner-java-tutorial.com/scrollable-jpopupmenu.html
That is the easy part though. You will need to use reflection to be able to get the class in question to reflect (tell you about itself ) on itself. I am not sure if this is a major feature in your app but if you are pretty new to Java then it could give you quite a headache.
Here is an example of Reflection:
http://www.onjava.com/pub/a/onjava/2007/03/15/reflections-on-java-reflection.html
Good luck.