Hallo SirWayne,
natürlich könnte ich das ganze auch ziemlich einfach machen. Ist eh alles nur Spielerrei. Mir geht aber darum etwas zu lernen. Das denk ich tu ich mit den JTabbedPane´s auf jeden Fall. Ich weis zwar noch nicht ob ich mir da nicht zu viel vornehme - aber hinterher ist man immer Schlauer. Und wenn ichs grad mach - dann kann ich es auch grad "richtig" machen.
Gruß
--- EDIT:
@Ebenius
In deinem Beispiel Code hast du doch die Methode installDefaults() vom BasicTabbedPaneUI überschrieben. Hast du noch zusätzlich was hinzugefügt damit die Methode überschrieben wird?? wenn ich den Klasse: BasicMyTabbedPaneUI folgendes ergenze ergibt sich keine Änderung:
[HIGHLIGHT="Java"]protected void paintTabBorder(Graphics g, int tabPlacement,
int tabIndex,
int x, int y, int w, int h,
boolean isSelected ) {
g.setColor(lightHighlight);
switch (tabPlacement) {
case LEFT:
g.drawLine(x+1, y+h-2, x+1, y+h-2); // bottom-left highlight
g.drawLine(x, y+2, x, y+h-3); // left highlight
g.drawLine(x+1, y+1, x+1, y+1); // top-left highlight
g.drawLine(x+2, y, x+w-1, y); // top highlight
g.setColor(Color.BLUE);
g.drawLine(x+2, y+h-2, x+w-1, y+h-2); // bottom shadow
g.setColor(Color.BLUE);
g.drawLine(x+2, y+h-1, x+w-1, y+h-1); // bottom dark shadow
break;
case RIGHT:
g.drawLine(x, y, x+w-3, y); // top highlight
g.setColor(Color.BLUE);
g.drawLine(x, y+h-2, x+w-3, y+h-2); // bottom shadow
g.drawLine(x+w-2, y+2, x+w-2, y+h-3); // right shadow
g.setColor(Color.BLUE);
g.drawLine(x+w-2, y+1, x+w-2, y+1); // top-right dark shadow
g.drawLine(x+w-2, y+h-2, x+w-2, y+h-2); // bottom-right dark shadow
g.drawLine(x+w-1, y+2, x+w-1, y+h-3); // right dark shadow
g.drawLine(x, y+h-1, x+w-3, y+h-1); // bottom dark shadow
break;
case BOTTOM:
g.drawLine(x, y, x, y+h-3); // left highlight
g.drawLine(x+1, y+h-2, x+1, y+h-2); // bottom-left highlight
g.setColor(Color.BLUE);
g.drawLine(x+2, y+h-2, x+w-3, y+h-2); // bottom shadow
g.drawLine(x+w-2, y, x+w-2, y+h-3); // right shadow
g.setColor(Color.BLUE);
g.drawLine(x+2, y+h-1, x+w-3, y+h-1); // bottom dark shadow
g.drawLine(x+w-2, y+h-2, x+w-2, y+h-2); // bottom-right dark shadow
g.drawLine(x+w-1, y, x+w-1, y+h-3); // right dark shadow
break;
case TOP:
default:
g.drawLine(x, y+2, x, y+h-1); // left highlight
g.drawLine(x+1, y+1, x+1, y+1); // top-left highlight
g.drawLine(x+2, y, x+w-3, y); // top highlight
g.setColor(Color.BLUE);
g.drawLine(x+w-2, y+2, x+w-2, y+h-1); // right shadow
g.setColor(Color.BLUE);
g.drawLine(x+w-1, y+2, x+w-1, y+h-1); // right dark-shadow
g.drawLine(x+w-2, y+1, x+w-2, y+1); // top-right shadow
}
}[/HIGHLIGHT]
Die Ränder werden immer noch Rot angezeit, so wie in installDefaults() festgelegt. An was liegt das??
Gruß