直接和简单: 想象一下,我们在一个扩展JPanel的类
-- Nutrition
INSERT INTO #ChronicCondition(IdApplicant, ExamDate, Condition, TreatmentNeeded, TreatmentReceived, Status, Comment)
SELECT #Enroll.IdApplicant,
HltNutrition.ExamDate,
'Nutrition',
HltNutrition.TrtNeed,
HltNutrition.TrtStatus,
HltNutrition.Status,
SUBSTRING (HltNutrition.Comment, 1, 1000)
FROM #Enroll
JOIN HltNutrition ON HltNutrition.IdApplicant = #Enroll.IdApplicant
WHERE HltNutrition.Overweight = 1
-- Chronic
INSERT INTO #ChronicCondition(IdApplicant, ExamDate, Condition, TreatmentNeeded, TreatmentReceived, Status, Comment)
SELECT #Enroll.IdApplicant,
HltChronic.ExamDate,
CASE ChronicCondition.Id
WHEN 3 THEN 'Other' + ISNULL(' - ' + hltChronic.ConditionOther, '')
ELSE ChronicCondition.Condition
END,
HltChronic.TrtNeed,
HltChronic.TrtStatus,
hltChronic.Status,
SUBSTRING (HltChronic.Comment, 1, 1000)
FROM #Enroll
JOIN hltChronic ON hltChronic.idApplicant = #Enroll.idApplicant
JOIN ChronicCondition ON ChronicCondition.Id = hltChronic.Condition
为什么?
不,我无法在任何地方找到它。我在广泛搜索这个具体问题。
答案 0 :(得分:0)
Java变量的作用(实际上)就像指针一样。
您创建了df.schema
并将其添加到JProgressBar
- 并在变量JPanel
中将指针存储到此处。当您致电bar
时,您会更改指针指向的内容,但不会更改原始bar = new JProgressBar(0, 0, 10);
(已添加到JProgressBar
的内容),您现在有一个新,不同的JPanel
(不已添加到您的JProgressBar
),因此在其上设置值不会修改 在JPanel
上可见
这与以下原因相同:
JPanel
将打印String name = "Billy";
String otherName = name;
name = "Jimmy";
System.out.println(otherName);
。