Home arrow static arrow Java Programming [Archive] - Breaking up long lines.
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - Breaking up long lines.
This topic has 1 reply on 1 page.

Posts:1,085
Registered: 4/14/03
Breaking up long lines.  
Aug 5, 2004 12:21 PM



 
I like that one can be expressive with identifiers in Java, but sometimes
it really makes it hard to keep lines of code at 78 characters in length. I am
posting a line of code below from a project I am working on. I am curious
to see how others out there would break up this particular line.

DasCanvasComponent dcc = (DasCanvasComponent)SwingUtilities.getAncestorOfClass(DasCanvasComponent.class, e.getComponent());
 

Posts:6,750
Registered: 1/25/04
Re: Breaking up long lines.  
Aug 5, 2004 12:24 PM (reply 1 of 1)



 
Any old way you feel like...
DasCanvasComponent dcc =        (DasCanvasComponent)SwingUtilities.getAncestorOfClass(DasCanvasComponent.class, e.getComponent());DasCanvasComponent dcc = (DasCanvasComponent)        SwingUtilities.getAncestorOfClass(DasCanvasComponent.class, e.getComponent());DasCanvasComponent dcc = (DasCanvasComponent)SwingUtilities.        getAncestorOfClass(DasCanvasComponent.class, e.getComponent());
etc
 
This topic has 1 reply on 1 page.