JParagraph para = new JParagraph( "Lorem ipsum dolor sit amet, consectetur adipiscing elit. " + "Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.");// With alignmentJParagraph centered = new JParagraph("This text is centered") .setAlignCenter();// With width constraintJParagraph constrained = new JParagraph("Constrained width paragraph") .width(400);
JParagraph intro = new JParagraph( "Welcome to our application. This is an introductory paragraph " + "that explains the main features and benefits.").withStyle("text-base", "text-gray-700");
JParagraph description = new JParagraph() .text("This content is centered and has a maximum width for optimal readability.") .setAlignCenter() .width(600) .withStyle("text-lg", "text-muted");
JParagraph htmlPara = new JParagraph() .setHtmlText( "<p>First paragraph with <strong>bold</strong> text.</p>" + "<p>Second paragraph with a <br/>line break.</p>" ) .width(500);
JParagraph body = new JParagraph( "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do " + "eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim " + "ad minim veniam, quis nostrud exercitation ullamco laboris.").setJustify().width(700).withStyle("text-base", "leading-relaxed");
VBox content = new VBox(16);JLabel heading = new JLabel("About Us") .withStyle("text-2xl", "font-bold");JParagraph para1 = new JParagraph( "We are a company dedicated to creating amazing products.").withStyle("text-base");JParagraph para2 = new JParagraph( "Our team consists of passionate individuals committed to excellence.").withStyle("text-base");content.getChildren().addAll(heading, para1, para2);