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.

[237 byte] By [student@sunDNa] at [2007-11-27 10:38:01]
# 1

> 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?

_helloWorld_a at 2007-7-28 18:51:53 > top of Java-index,Java Essentials,Java Programming...
# 2

yes.

I just want to know how can I add list to JTextArea.

have any idea?

student@sunDNa at 2007-7-28 18:51:53 > top of Java-index,Java Essentials,Java Programming...
# 3

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.

_helloWorld_a at 2007-7-28 18:51:53 > top of Java-index,Java Essentials,Java Programming...