0

I am developing an application just like Notepad,Wordpad e.t.c

I have achieved many targets which is the requirement of an app .

But the problem is that i want to allow the user to change color of font by choosing color from JComboBox (Just like in Wordpad).

I made a JPanel with a combinations of color . I want this panel to add in in drop down list.

Can anyone help me ??

Really needed!!!

M.H
  • 3
  • 5
  • 1
    Please post your code here. – ItamarG3 Oct 14 '16 at 18:15
  • Welcome to Stack Overflow! Please review our [SO Question Checklist](http://meta.stackoverflow.com/questions/260648/stack-overflow-question-checklist) to help you to ask a good question, and thus get a good answer. – Joe C Oct 14 '16 at 18:20
  • You can't place **any** components inside a JComboBox -- but you can use your JPanel as the combo box's cell renderer. For better help, show your [mcve]. – Hovercraft Full Of Eels Oct 14 '16 at 18:26
  • Never mind -- check [Andrew Thompson's answer to this question](http://stackoverflow.com/questions/10951449/multiple-colors-for-each-item-in-jcombobox) which seems to do *exactly* what you're looking for. Then up-vote that answer and question. – Hovercraft Full Of Eels Oct 14 '16 at 18:30
  • I want multiple colors in same cell just like in wordpad. In this example there is only one color in each row. – M.H Oct 15 '16 at 09:22

0 Answers0