|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
New to Java - problem with get method
I am trying to read a variable that is inside a public modifier by calling a get method from a private modifier and its not being recognised. Is it not possible to do this? here is the code:
public static Color DrawJapplet2 () { Color c; JFrame framename = new JFrame(); JColorChooser colorChooser = new JColorChooser(); Color chosen = colorChooser.getColor(); return (Color)chosen; } private void ccButtonActionPerformed(java.awt.event.ActionEvent evt) { Color colour = JColorChooser.showDialog(this, "Choose Background Color", Color.BLACK); } private void picturePanelMouseClicked(java.awt.event.MouseEvent evt) { Graphics g = picturePanel.getGraphics(); Color selection = getChosen;this is where my problem lies int shape = (int) shapeComboBox.getSelectedIndex(); int....... |
![]() |
| Viewing: Dev Articles Community Forums > Programming > Java Development > New to Java - problem with get method |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|