method:getForeground ();return type:Colorcontent:ใช้คืนค่า สีตัวอักษร ของ componentexample:JButton button = new JButton ( "cancel" ); Color color = button.getForeground ();