我想要一个具有大小和定义位置的JPanel.在JPanel内部,我有一定数量的元素(按钮)水平插入.因为我的JPanel有一个已定义的宽度,如果我添加了很多按钮,我就看不到了.在这种情况下,我需要一个这个JPanel的滚动条.但是这个JPanel必须是JFrame中某个位置的特定尺寸.JPanel的滚动条水平放置在它下面.有人可以帮帮我吗?我尝试过没有成功!
添加copyBootstrap
到build.gradle
我之后,我 在尝试运行构建任务时遇到下一个错误:
FAILURE:构建因异常而失败.
- 什么地方出了错:
配置根项目时出现问题'.在依赖解析中包含配置后,无法更改配置':providedCompile'的依赖关系.
怎么可以解决这个问题?我在互联网上搜索但没有找到解决方案.我copyBootstrap
从这个链接得到了任务.他们的目标是从org.webjars
组罐中提取所有内容到特定路径.
我正在使用Gradle 3.2和Intellij IDEA 2016.2.5
//group 'org'
//version '1.0-SNAPSHOT'
task wrapper(type: Wrapper) {
gradleVersion = '3.2'
distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip"
}
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.akhikhl.gretty:gretty:1.4.0'
}
}
repositories {
mavenCentral()
jcenter()
}
//apply plugin: 'java'
//apply plugin: 'eclipse-wtp'
//apply from: 'https://raw.github.com/akhikhl/gretty/master/pluginScripts/gretty.plugin'
apply plugin: 'war'
apply plugin: 'org.akhikhl.gretty'
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
//compile …
Run Code Online (Sandbox Code Playgroud) 我开始用KDevelop和Git编程.
我正在使用KDevelop 4.4.1在C++中创建一个项目,实际上我在Assembla中有一个Git帐户.
我可以创建一个"内部git存储库",与KDevelop一起提交.
我正在研究如何将我的项目推入我的帐户,但我没有找到足够的信息.我如何将我的项目推送到Assembla的回购中?
我是 C++ 初学者。我写了以下内容:
// GradeBook.h
#include <iostream>
#include <string>
using namespace std;
class GradeBook {
public:
GradeBook(string); // constructor that initializes courseName
void setCourseName(string); // function that sets the course name
string getCourseName(); // function that gets the course name
void displayMessage(); // function that displays a welcome message
private:
string courseName; // course name for this GradeBook
};
// GradeBook.cpp
#include <iostream>
#include "GradeBook.h"
using namespace std;
GradeBook::GradeBook(string name)
{
setCourseName(name);
}
void GradeBook::setCourseName(string name)
{
courseName = name; …
Run Code Online (Sandbox Code Playgroud)