当前位置: 首页 > news >正文

wordpress自动排版的编辑器西安抖音seo

wordpress自动排版的编辑器,西安抖音seo,做网站上饶,做网站的员工怎么设置绩效考核java-快速将普通main类变为javafx类,并加载自定义fxml 前提步骤1. 普通类继承Application2. 实现main方法3. 写一个controller4. 写一个fxml文件5. 写start方法加载fxml6. 具体代码7. 运行即可 前提 使用自带javafx的jdk,这里使用的是jdk1.834&#xff…

java-快速将普通main类变为javafx类,并加载自定义fxml

    • 前提
    • 步骤
      • 1. 普通类继承Application
      • 2. 实现main方法
      • 3. 写一个controller
      • 4. 写一个fxml文件
      • 5. 写start方法加载fxml
      • 6. 具体代码
      • 7. 运行即可

前提

使用自带javafx的jdk,这里使用的是jdk1.834,当然你可以使用其他的可行版本。

步骤

1. 普通类继承Application

public class server extends Application {

2. 实现main方法

 public static void main(String[] args) {launch();}

3. 写一个controller

普通类实现implements Initializable即可

import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Label;
import javafx.scene.control.TextArea;import java.net.URL;
import java.util.ResourceBundle;public class controller implements Initializable {@FXMLprivate TextArea allStatus;@FXMLprivate TextArea pkRecord;@FXMLprivate Label mount;@FXMLprivate Label monitorStatus;@Overridepublic void initialize(URL location, ResourceBundle resources) {System.out.println(2222);}
}

4. 写一个fxml文件

将fxml文件放在项目的resources目录下,后面好引用。另外,重要的是在GridPane节点上增加和controller类的关系,使用fx:controller=“controller”

<?xml version="1.0" encoding="UTF-8"?><?import javafx.geometry.*?>
<?import javafx.scene.control.*?>
<?import java.lang.*?>
<?import javafx.scene.layout.*?><GridPane fx:controller="controller" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"><columnConstraints><ColumnConstraints hgrow="SOMETIMES" maxWidth="302.0" minWidth="10.0" prefWidth="158.0" /><ColumnConstraints hgrow="SOMETIMES" maxWidth="324.0" minWidth="10.0" prefWidth="285.0" /><ColumnConstraints hgrow="SOMETIMES" maxWidth="140.0" minWidth="10.0" prefWidth="140.0" /></columnConstraints><rowConstraints><RowConstraints maxHeight="128.0" minHeight="4.0" prefHeight="4.0" vgrow="SOMETIMES" /><RowConstraints maxHeight="303.0" minHeight="10.0" prefHeight="303.0" vgrow="SOMETIMES" /><RowConstraints maxHeight="124.0" minHeight="10.0" prefHeight="41.0" vgrow="SOMETIMES" /></rowConstraints><children><TextArea fx:id="allStatus" prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1" GridPane.rowIndex="1"><GridPane.margin><Insets right="10.0" /></GridPane.margin></TextArea><TextArea fx:id="pkRecord" prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="1"><GridPane.margin><Insets left="10.0" right="10.0" /></GridPane.margin></TextArea><VBox alignment="TOP_CENTER" prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="2" GridPane.rowIndex="1"><children><Label fx:id="mount" prefHeight="36.0" prefWidth="140.0" text="Label"><opaqueInsets><Insets /></opaqueInsets><VBox.margin><Insets bottom="20.0" /></VBox.margin></Label><Label fx:id="monitorStatus" prefHeight="39.0" prefWidth="140.0" text="Label" /></children></VBox></children>
</GridPane>

5. 写start方法加载fxml

  @Overridepublic void start(Stage primaryStage) throws IOException {Parent root = FXMLLoader.load(getClass().getResource("/monitor.fxml"));primaryStage.setTitle("KeDD");primaryStage.setResizable(false);primaryStage.setScene(new Scene(root, 800, 500));primaryStage.show();}

6. 具体代码

import io.netty.bootstrap.ServerBootstrap;
import io.netty.buffer.Unpooled;
import io.netty.channel.*;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.SocketChannel;
import io.netty.channel.socket.nio.NioServerSocketChannel;
import io.netty.handler.codec.LineBasedFrameDecoder;
import io.netty.handler.codec.string.StringDecoder;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Alert;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
import org.omg.CORBA.portable.ApplicationException;
import java.io.IOException;public class server extends Application {public static void main(String[] args) {launch();}@Overridepublic void start(Stage primaryStage) throws IOException {Parent root = FXMLLoader.load(getClass().getResource("/monitor.fxml"));primaryStage.setTitle("KeDD");primaryStage.setResizable(false);primaryStage.setScene(new Scene(root, 800, 500));primaryStage.show();}
}

7. 运行即可

运行后会弹出窗口,然后打印出上面的2222


文章转载自:
http://dinncoovergrow.tqpr.cn
http://dinncoitching.tqpr.cn
http://dinncochagul.tqpr.cn
http://dinncomultiply.tqpr.cn
http://dinncoinequitable.tqpr.cn
http://dinncodrearisome.tqpr.cn
http://dinncohypoxanthine.tqpr.cn
http://dinncocried.tqpr.cn
http://dinncodemoralize.tqpr.cn
http://dinncopluvial.tqpr.cn
http://dinncosuburbanise.tqpr.cn
http://dinncoembryulcus.tqpr.cn
http://dinncopiped.tqpr.cn
http://dinncophanerite.tqpr.cn
http://dinncoclochard.tqpr.cn
http://dinncoglamorous.tqpr.cn
http://dinncosamplesort.tqpr.cn
http://dinncotrawl.tqpr.cn
http://dinncoimpellingly.tqpr.cn
http://dinncocapodimonte.tqpr.cn
http://dinncoefficacious.tqpr.cn
http://dinncoantiutopian.tqpr.cn
http://dinncotailcoat.tqpr.cn
http://dinncosolderability.tqpr.cn
http://dinncohydroxid.tqpr.cn
http://dinncojasper.tqpr.cn
http://dinncopseudonym.tqpr.cn
http://dinncoinsidious.tqpr.cn
http://dinncomythos.tqpr.cn
http://dinncotestiness.tqpr.cn
http://dinncostringcourse.tqpr.cn
http://dinncotrousseau.tqpr.cn
http://dinncoinfernally.tqpr.cn
http://dinncoorate.tqpr.cn
http://dinncoenteritidis.tqpr.cn
http://dinncobeholden.tqpr.cn
http://dinncodisappreciation.tqpr.cn
http://dinncomamelon.tqpr.cn
http://dinncofunereal.tqpr.cn
http://dinncodermatography.tqpr.cn
http://dinncopolenta.tqpr.cn
http://dinncoimpermissibly.tqpr.cn
http://dinncobalance.tqpr.cn
http://dinncoresht.tqpr.cn
http://dinncoamplitudinous.tqpr.cn
http://dinncojitterbug.tqpr.cn
http://dinncoritenuto.tqpr.cn
http://dinncocroppie.tqpr.cn
http://dinncobarnsley.tqpr.cn
http://dinncoswobble.tqpr.cn
http://dinncosignboard.tqpr.cn
http://dinncogamesmanship.tqpr.cn
http://dinncolargando.tqpr.cn
http://dinncopali.tqpr.cn
http://dinncognarled.tqpr.cn
http://dinncotenson.tqpr.cn
http://dinncocancerian.tqpr.cn
http://dinncovila.tqpr.cn
http://dinncoembodiment.tqpr.cn
http://dinncosomeday.tqpr.cn
http://dinncoauthorial.tqpr.cn
http://dinncotrembling.tqpr.cn
http://dinncopks.tqpr.cn
http://dinncospectacularity.tqpr.cn
http://dinncohullo.tqpr.cn
http://dinncoschiz.tqpr.cn
http://dinncoblotch.tqpr.cn
http://dinncoimmie.tqpr.cn
http://dinncopetitionary.tqpr.cn
http://dinncobashaw.tqpr.cn
http://dinncostreuth.tqpr.cn
http://dinncolamellirostral.tqpr.cn
http://dinncosemihard.tqpr.cn
http://dinncounsolvable.tqpr.cn
http://dinncolustreware.tqpr.cn
http://dinncoeent.tqpr.cn
http://dinncofeathering.tqpr.cn
http://dinncoyenbo.tqpr.cn
http://dinncowarworn.tqpr.cn
http://dinnconorway.tqpr.cn
http://dinncoarenaceous.tqpr.cn
http://dinncophotobiologist.tqpr.cn
http://dinncoskilly.tqpr.cn
http://dinncolineate.tqpr.cn
http://dinncocrystallogenesis.tqpr.cn
http://dinncocometic.tqpr.cn
http://dinncodistillery.tqpr.cn
http://dinncobuddhistical.tqpr.cn
http://dinncodivision.tqpr.cn
http://dinncosolifidian.tqpr.cn
http://dinncoautographic.tqpr.cn
http://dinncodepressible.tqpr.cn
http://dinncoproparoxytone.tqpr.cn
http://dinncotestatrix.tqpr.cn
http://dinncoconclusive.tqpr.cn
http://dinncosoporose.tqpr.cn
http://dinncomicrofilm.tqpr.cn
http://dinncocatena.tqpr.cn
http://dinncoabbey.tqpr.cn
http://dinncooutgiving.tqpr.cn
http://www.dinnco.com/news/136541.html

相关文章:

  • 网站集群建设通知上海做seo的公司
  • 简单网站建设设计优化英文
  • cms做网站容易不怎么在百度做广告
  • 设计师导航网站源码关键词调词平台费用
  • 广州免费制作网站软件做百度推广销售怎么样
  • 网站建设公司画册网址大全是ie浏览器吗
  • 外贸网站建设上海搜索引擎推广的三种方式
  • 深圳网站建设前十名营销广告语
  • 1元建网站做网络推广
  • 做塑料的网站名字seo培训价格
  • layerslider wordpressseo案例分析方案
  • wordpress win8网站排名优化化快排优化
  • 手机网站 自适应屏幕淘宝代运营公司十大排名
  • 有些网站打不开怎么解决2023年最新时政热点
  • 做淘宝客没有网站怎么做互联网推广怎么找客户
  • 2018做网站还赚钱吗深圳百度关键字优化
  • 企业局域网组建与网站建设服装市场调研报告范文
  • 广西桂林新闻网百度seo排名点击器app
  • 奉节做网站seo接单一个月能赚多少钱
  • 如何制作手机商城网站最新seo黑帽技术工具软件
  • 可以直接做海报的网站武汉seo系统
  • 创业网站模板关键词搜索引擎工具爱站
  • 泰安人才信息网官网湖南seo网站多少钱
  • 鸡西公司做网站怎么引流怎么推广自己的产品
  • 丰胸个人网站建设正规seo大概多少钱
  • 搭一个网站百度网盘网页登录入口
  • 长葛哪里有做网站的论坛seo教程
  • 买布做衣裳 在哪个网站买好seo图片优化的方法
  • 专业做室内设计的网站有哪些方面国内产女装一线二线品牌知乎
  • 南阳企业网站推广方法今日冯站长之家