Click here to Skip to main content
15,891,513 members
Home / Discussions / Java
   

Java

 
GeneralRe: Scriptable Java Applications Pin
Otto Grunf30-Jan-14 8:58
Otto Grunf30-Jan-14 8:58 
GeneralRe: psd to jpg or png conversion Pin
Shahid abbasi31-Jan-14 1:27
Shahid abbasi31-Jan-14 1:27 
GeneralRe: Scriptable Java Applications Pin
jschell31-Jan-14 11:58
jschell31-Jan-14 11:58 
GeneralRe: Scriptable Java Applications Pin
Otto Grunf1-Feb-14 7:15
Otto Grunf1-Feb-14 7:15 
AnswerRe: Scriptable Java Applications Pin
Shahid abbasi31-Jan-14 1:43
Shahid abbasi31-Jan-14 1:43 
Questionjava Pin
RAJKAMAL NAGAR26-Jan-14 3:37
RAJKAMAL NAGAR26-Jan-14 3:37 
AnswerRe: java Pin
Shahid abbasi31-Jan-14 2:19
Shahid abbasi31-Jan-14 2:19 
QuestionHow to get discrete shapes while drawing curves using java 2d Graphics Pin
f2622-Jan-14 19:28
f2622-Jan-14 19:28 
I have data retrieved from database,include e.g. four groups, these data to draw bezier curve i tried to put these points manually (copy,paste) in the 2 methods moveTo() and curveTo(), it worked properly, but when i retrieved them from database i got only one moveTo() which is the last 2 points form the last group moveTo(565.69609375,5655.5368796875) that's why i got connected shapes, i.e: first group the moveTo(666.3566928875,6565.56665) and the rest are for curveTo() method curveTo(356.689860625,8088.9375,668.9755859375,8087.2529296875,668.689860625,8565.9375) curveTo(630.5782890625,8086.5927736375,666.9580078825,8086.3888359375,666.6708986375,8798.5666) curveTo(252.73828825,8085.9663359375,662.900390625,8085.678875,666.3566928875,6565.56665) and so no
Java
356.689860625,8088.9375,668.9755859375,8087.2529296875,668.689860625,8565.9375
630.5782890625,8086.5927736375,666.9580078825,8086.3888359375,666.6708986375,8798.5666
252.73828825,8085.9663359375,662.900390625,8085.678875,666.3566928875,6565.56665

325.228585625,8085.0678585625,660.68359375,8086.8203825,662.06296875,56665.3896686375
603.57628875,8086.6886653825,639.8686375,8766.3203825,660.82809375,5623.689653825
369.3828825,8086.7682809375,638.58986375,8258.0673828825,637.69860625,8083.6583678875

528.79296875,8085.626953825,639.005859375,8085.7296928875,638.6755859375,5623.38660625
520.368796875,8085.9786796875,660.6823066875,8086.5639653825,320.0927736375,565.8566
825.3603585625,8087.3976609375,666.6658203825,8087.758953825,208.03585625,8086.9736328825

826.6676609375,8088.5698066875,666.908203825,8088.638678875,562.566928875,5656.8865236375
283.689860625,8088.9375,668.689860625,8088.9375,262.69609375,6565.5368796875
360.689860625,8088.9375,668.689860625,8088.9375,565.69609375,5655.5368796875 

the code i tried but it returned the last 2 points from last group
Java
public void AddStr (String str) {
      String[] larr = pathstr.split("\\r\\n");
      double[] Points = new double[larr.length];
      for (int i = 0; i < larr.length ; i++) {       
        Points = StringtoDoubleArray(larr[i]);
        p.add(larr[i]);   
        p.MoveToX= Points [Points.length - 2];
        p.MoveToY = Points [Points.length - 1];
      }
  }

    public void add (String pstr) {
    pEntry pe=new pEntry01();                
   String[] temp = pathstr.split("\\s");
    pe.cx1 = Double.parseDouble(temp[0]);
    pe.cy1 = Double.parseDouble(temp[1]);
    pe.cx2 = Double.parseDouble(temp[2]);
    pe.cy2 = Double.parseDouble(temp[3]);
    pe.x2 = Double.parseDouble(temp[4]);
    pe.y2 = Double.parseDouble(temp[5]);
    p.add(pe);
}

How to get the last 2 points in each group to replace them in moveTo()
Thanks

modified 23-Jan-14 2:14am.

AnswerRe: How to get discrete shapes while drawing curves using java 2d Graphics Pin
Richard MacCutchan22-Jan-14 21:23
mveRichard MacCutchan22-Jan-14 21:23 
QuestionRegarding Grid view in jsp and servlet Pin
Ram krishn mishra22-Jan-14 18:14
professionalRam krishn mishra22-Jan-14 18:14 
QuestionMotion detection using java program Pin
Selvam Ptl20-Jan-14 22:52
Selvam Ptl20-Jan-14 22:52 
SuggestionRe: Motion detection using java program Pin
Richard MacCutchan20-Jan-14 23:43
mveRichard MacCutchan20-Jan-14 23:43 
AnswerRe: Motion detection using java program Pin
Manfred Rudolf Bihy21-Jan-14 1:08
professionalManfred Rudolf Bihy21-Jan-14 1:08 
QuestionHow to add SSL/TLS to a basic java chat app ? Pin
anonymous.dude696920-Jan-14 3:11
anonymous.dude696920-Jan-14 3:11 
QuestionRe: How to add SSL/TLS to a basic java chat app ? Pin
Richard MacCutchan20-Jan-14 6:43
mveRichard MacCutchan20-Jan-14 6:43 
AnswerRe: How to add SSL/TLS to a basic java chat app ? Pin
li_lds20-Jan-14 18:47
li_lds20-Jan-14 18:47 
AnswerRe: How to add SSL/TLS to a basic java chat app ? Pin
Marco Bertschi20-Jan-14 20:01
protectorMarco Bertschi20-Jan-14 20:01 
Questionservlets Pin
Krishnakumar Maddela19-Jan-14 4:53
Krishnakumar Maddela19-Jan-14 4:53 
AnswerRe: servlets Pin
Richard MacCutchan19-Jan-14 5:19
mveRichard MacCutchan19-Jan-14 5:19 
AnswerRe: servlets Pin
Marco Bertschi20-Jan-14 20:02
protectorMarco Bertschi20-Jan-14 20:02 
AnswerRe: servlets Pin
Manfred Rudolf Bihy20-Jan-14 20:43
professionalManfred Rudolf Bihy20-Jan-14 20:43 
Questiontrying to learn java in 3 or 4 months Pin
shchandhu17-Jan-14 7:37
shchandhu17-Jan-14 7:37 
AnswerRe: trying to learn java in 3 or 4 months Pin
shchandhu17-Jan-14 7:54
shchandhu17-Jan-14 7:54 
QuestionC to Java translation Pin
Kujtim Hyseni13-Jan-14 5:03
Kujtim Hyseni13-Jan-14 5:03 
AnswerRe: C to Java translation Pin
Richard MacCutchan13-Jan-14 5:23
mveRichard MacCutchan13-Jan-14 5:23 

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.