Click here to Skip to main content
15,889,651 members
Home / Discussions / Java
   

Java

 
GeneralRe: how to display panel just below input panel.? Pin
Member 109447528-Nov-14 18:25
Member 109447528-Nov-14 18:25 
QuestionRe: how to display panel just below input panel.? Pin
Richard MacCutchan7-Oct-14 2:50
mveRichard MacCutchan7-Oct-14 2:50 
AnswerRe: how to display panel just below input panel.? Pin
mybm17-Oct-14 18:00
mybm17-Oct-14 18:00 
GeneralRe: how to display panel just below input panel.? Pin
Richard MacCutchan7-Oct-14 22:26
mveRichard MacCutchan7-Oct-14 22:26 
GeneralRe: how to display panel just below input panel.? Pin
mybm18-Oct-14 2:55
mybm18-Oct-14 2:55 
Questionerror: could not find or load main class Pin
Member 1108183230-Sep-14 10:00
Member 1108183230-Sep-14 10:00 
SuggestionRe: error: could not find or load main class Pin
Richard MacCutchan30-Sep-14 21:04
mveRichard MacCutchan30-Sep-14 21:04 
GeneralRe: error: could not find or load main class Pin
Member 110818321-Oct-14 11:14
Member 110818321-Oct-14 11:14 
Java
import org.graphstream.graph.*;
import org.graphstream.graph.implementations.*;
import java.util.Iterator;

public class GraphExplore {
    public static void main(String args[]) {
        new GraphExplore();
    }

    public GraphExplore() {
        Graph graph = new SingleGraph("tutorial 1");

        graph.addAttribute("ui.stylesheet", styleSheet);
        graph.setAutoCreate(true);
        graph.setStrict(false);
        graph.display();

        graph.addEdge("AB", "A", "B");
        graph.addEdge("BC", "B", "C");
        graph.addEdge("CA", "C", "A");
        graph.addEdge("AD", "A", "D");
        graph.addEdge("DE", "D", "E");
        graph.addEdge("DF", "D", "F");
        graph.addEdge("EF", "E", "F");

        for (Node node : graph) {
            node.addAttribute("ui.label", node.getId());
        }

        explore(graph.getNode("A"));
    }

    public void explore(Node source) {
        Iterator<? extends Node> k = source.getBreadthFirstIterator();

        while (k.hasNext()) {
            Node next = k.next();
            next.setAttribute("ui.class", "marked");
            sleep();
        }
    }

    protected void sleep() {
        try { Thread.sleep(1000); } catch (Exception e) {}
    }

    protected String styleSheet =
        "node {" +
        "   fill-color: black;" +
        "}" +
        "node.marked {" +
        "   fill-color: red;" +
        "}";
}

GeneralRe: error: could not find or load main class Pin
Richard MacCutchan1-Oct-14 21:24
mveRichard MacCutchan1-Oct-14 21:24 
GeneralRe: error: could not find or load main class Pin
Oscar06-Oct-14 13:18
Oscar06-Oct-14 13:18 
AnswerRe: error: could not find or load main class Pin
TorstenH.1-Oct-14 21:03
TorstenH.1-Oct-14 21:03 
AnswerRe: error: could not find or load main class Pin
Member 1115477415-Oct-14 0:20
Member 1115477415-Oct-14 0:20 
QuestionDeploy an ASP.NET application on WebLogic Pin
ThetaClear29-Sep-14 3:57
ThetaClear29-Sep-14 3:57 
AnswerRe: Deploy an ASP.NET application on WebLogic Pin
Richard MacCutchan29-Sep-14 5:30
mveRichard MacCutchan29-Sep-14 5:30 
GeneralRe: Deploy an ASP.NET application on WebLogic Pin
ThetaClear29-Sep-14 5:33
ThetaClear29-Sep-14 5:33 
GeneralRe: Deploy an ASP.NET application on WebLogic Pin
Richard MacCutchan29-Sep-14 5:43
mveRichard MacCutchan29-Sep-14 5:43 
GeneralRe: Deploy an ASP.NET application on WebLogic Pin
ZurdoDev30-Sep-14 10:30
professionalZurdoDev30-Sep-14 10:30 
GeneralRe: Deploy an ASP.NET application on WebLogic Pin
Richard MacCutchan30-Sep-14 21:02
mveRichard MacCutchan30-Sep-14 21:02 
GeneralRe: Deploy an ASP.NET application on WebLogic Pin
ZurdoDev1-Oct-14 1:17
professionalZurdoDev1-Oct-14 1:17 
GeneralRe: Deploy an ASP.NET application on WebLogic Pin
Richard MacCutchan1-Oct-14 1:27
mveRichard MacCutchan1-Oct-14 1:27 
AnswerRe: Deploy an ASP.NET application on WebLogic Pin
jschell29-Sep-14 7:53
jschell29-Sep-14 7:53 
QuestionError connecting Oracle on localhost: Could not get JDBC Connection ? Pin
taibc27-Sep-14 5:56
taibc27-Sep-14 5:56 
AnswerRe: Error connecting Oracle on localhost: Could not get JDBC Connection ? Pin
jorgesys9-Oct-14 11:12
jorgesys9-Oct-14 11:12 
Questionadding smileys to client server program in java Pin
Member 1111353426-Sep-14 23:02
Member 1111353426-Sep-14 23:02 
AnswerRe: adding smileys to client server program in java Pin
Richard MacCutchan27-Sep-14 2:24
mveRichard MacCutchan27-Sep-14 2:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.