我希望用Java创建一个GUI,我将控件或元素放在左窗格上,然后将它们拖到设计器窗格上,类似于在Visio中创建模型.
我正在看的当前是JGraphX,它允许你创建图表等.
有没有其他项目支持这个,或工具等.
我正在使用Maven exec插件从命令行运行java应用程序,命令为mvn exec:java.我已经在pom.xml中指定了主类以及相关的依赖项.
<groupId>com.example.MyApp</groupId>
<artifactId>MyApp</artifactId>
<version>1.0.0</version>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>com.example.myclass</mainClass>
<arguments>
<argument>configFile</argument>
<argument>properties</argument>
</arguments>
</configuration>
</plugin>
Run Code Online (Sandbox Code Playgroud)
我还指定了一些依赖...
<dependencies>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>com.example.MyLibrary</groupId>
<artifactId>MyLibrary</artifactId>
<version>1.0.0</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)
该MyApp程序读取一个配置文件,该文件作为命令行参数传入.配置文件包含位于的类的名称MyLibrary.所以这个类可能com.mypackage.driver.MyClass位于上面列出MyLibrary的MyAppjar 的依赖项中.但是,当我尝试运行时,我得到一个ClassNotFoundException......
更新----我正在使用系统类加载器来加载在MyApp程序命令行中传入的类
ClassLoader loader = ClassLoader.getSystemClassLoader();
Run Code Online (Sandbox Code Playgroud)
我认为这是导致问题,因为它正在寻找默认类路径上不包含依赖项的类.
我在这里做错了什么提示?
我想在焦点上调整textArea中的行数,在模糊时删除它们.除了焦点,我想显示一个隐藏的div层.我目前的解决方案是
<textarea class="form-control" rows="1" placeholder="Please enter text..."
onfocus="this.rows=3" ng-focus="isVisible = !isVisible" onblur="this.rows=1"
ng-blur="isVisible = !isVisible"></textarea>
Run Code Online (Sandbox Code Playgroud)
从上面可以看出,我必须使用两个属性,即HTML onfocus增加行和ng-focus更新isVisible(显示和隐藏div).它有效,但我想知道是否可以使用ng-focus和ng-blur增加和减少行数.
Div层我正在展示和隐藏
<div class="row" ng-show="isVisible" />
Run Code Online (Sandbox Code Playgroud)
提前致谢