SCJP
Visit my download page
it is my understanding that setSelectedItem() fires an action event.
SCJP
Visit my download page
well, this seems pretty strange to me. actionPerformed() IS getting called from the constructor but it doesn't change the font
Randall Twede wrote:when the frame is displayed "Times New Roman" is the selected item, but the font type is not"Times New Roman"
if i open the combo box and click "Times New Roman", then the font changes to "Times New Roman"
it is my understanding that setSelectedItem() fires an action event.
is that correct?
is the problem that i am calling it from the constructor?
any ideas on how to solve this?
Andrea, andbin.dev — SCJP 5 (91%) – SCWCD 5 (94%)
java.util.function Interfaces Cheat Sheet — Java Versions Cheat Sheet
SCJP
Visit my download page
An action to set the font size in the associated JEditorPane.
as i expected, it behaves the same way as the real program.
SCJP
Visit my download page
SCJP
Visit my download page
SCJP
Visit my download page
You seemed to have missed out my earlier post with the hint of associating the FontSizeAction with the JEditorPane
Rob Camick wrote:That code still doesn't help. The problem is that the OP wants the text to be font size 72 as soon as the frame is made visible, without the user making any selection from the combo box.
SCJP
Visit my download page
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |